Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Returns an HTML input tag. The filter’s input will be the name attribute for the HTML tag. The filter accepts an extra argument which is the HTML input’s type (such as texttextareacheckbox).

All extra arguments will be parsed as HTML attributes.

Input:

{{ "input_field_name" | html_input: "text", class: "form-textbox" }}

Output:

<input type="text" name="input_field_name" class="form-textbox">

Note that it might be useful to use this filter in combination with the form_input_nameas follows:

Input:

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

Output:

<input type="checkbox" name="form_message[content][name]">

  • No labels