Form field

A field on an enquiry form.

A field on an enquiry form. Access via form.fields inside the enquiry_form tag.

Properties

errors

Validation errors for this field after a failed form submission.

Returns: Array (String) — lowercase messages such as can't be blank or is invalid; empty when there are no errors.

{% for error in field.errors %}
  {{ field.name }}: {{ error }}
{% endfor %}

hint

Help text for the field, as configured in the seller admin.

Returns: String or nil — HTML markup, or nil for default fields.

label

Internal field key used for validation errors on default fields.

Returns: String

name

Display name for the field, used as the input label and name attribute.

Returns: String

position

Zero-based position of this field in the form's field list.

Returns: Integer

required

Whether the field must be filled in for a successful submission.

Returns: Boolean

type

HTML input type for rendering this field (e.g. text, checkbox, select, date, datetime).

Returns: String

On this page