Textarea

Add Field

// Textarea example
$form->addField('Message', 'textarea', ['rows' => 5]);

Attributes

You can customize the field with one of these optional parameters:

Parameter Type Default Info
required boolean true Validation will return false when the field is left empty
classlist string has-error will be added to classes if validation returns false.
is-valid will be added if the validation was successful.
Add classes to input field and its field wrap e.g. column-with classes of a grid system.
cols string Number of colums (better style your area with css)
rows int Number of rows (better style your area with css)
maxlength int Maximum number of input characters
label int Label for input field
placeholder string Input field placeholder
regex String Validation will match input against this regular expression
readonly string false Read-Only field if it only is available under specific circumstances.
autofocus string false Set cursor autofocus to this field. Only use for a single field per form.