html_input

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 tht 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_name as follows:

Input:

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

Output: