Link Search Menu Expand Document

Form field

object

Represents each field of an Enquiry form that the Creator has constructed in the Admin.


Attributes

field.errors

array of strings

After a failed form submission, errors will return an array of error messages for any validations that have failed for this field. These will all be lowercase.

E.g. can't be blank, is invalid.

field.hint

string

The hint is constructed in a WYSIWYG editor and is returned with HTML markup.

field.label

string

Returns the string that should be used as the input’s label.

field.name

string

Returns the string that should be set as the name attribute, to ensure successful form submission.

field.required

boolean

Returns true or false depending on whether the field is required for successful form submission.

field.type

string

Returns a string indicating the input type, e.g. text for a element type of <input type="text">.


Table of contents