Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • required: whether the registered field should be validated on presence. (Default: false)

  • array: whether the input sent for the registered field is an array. E.g. with multiple file fields (Default: false)

Example:

Code Block
{% register_form_field field_line.name, required: field_line.required, array: false %}

Note that this tag does not directly output anything in the HTML. In the background this tag adds some information to a hash that is generated by the form tag. 

To generate the HTML, use the form_input_name and html_input filters.

Input:

Code Block
{{ "Name" | form_input_name | html_input: "checkbox" }}

...