CoolCMS API

FormFieldsTrait

Meta fields beyond the parameters: the edit password and reCAPTCHA.

They are not stored as AdvertParameterRel, so they are added via the hook beforeSubmitButton(), not via parameterItems.

Table of Contents

Constants

ADVERT_PASSWORD_MIN_LENGTH  : mixed = 6
Minimum length of a custom advert edit password.

Methods

beforeSubmitButton()  : void
gateAdvertColumns()  : void
Column gates of the parameters written into advert columns: the contact e-mail goes to `email` varchar(255) ({@see BuildAdvertTrait}) and the price is copied to the sort column `price` decimal(12,3) (`AdvertPriceColumnTrait` on the Api). The parameter builder knows only the parameter type, so a longer e-mail or a price out of the column range (exponent, negative, 10^9 and more) failed the whole save on the database with the generic "could not be saved" message instead of an error at the field.
parameterControl()  : BaseControl|null
Form control of the parameter with the given key, null when the category does not use it.

Constants

ADVERT_PASSWORD_MIN_LENGTH

Minimum length of a custom advert edit password.

private mixed ADVERT_PASSWORD_MIN_LENGTH = 6

Methods

gateAdvertColumns()

Column gates of the parameters written into advert columns: the contact e-mail goes to `email` varchar(255) ({@see BuildAdvertTrait}) and the price is copied to the sort column `price` decimal(12,3) (`AdvertPriceColumnTrait` on the Api). The parameter builder knows only the parameter type, so a longer e-mail or a price out of the column range (exponent, negative, 10^9 and more) failed the whole save on the database with the generic "could not be saved" message instead of an error at the field.

private gateAdvertColumns(Form $form) : void
Parameters
$form : Form

parameterControl()

Form control of the parameter with the given key, null when the category does not use it.

private parameterControl(Form $form, string $key) : BaseControl|null
Parameters
$form : Form
$key : string
Return values
BaseControl|null
On this page

Search results