The text_tag
helper tag generates a text field.
- name: The input's name attribute.
- label: Adds label text above the text field.
- value: The starting value of the text field. By default this will be empty.
- id: The input's ID attribute. By default this will be set to the name, converted into a
variable_name
-style string.
Helper Tag
{% text_tag name: "name", label: "Text field label!", value: "value", id: "id" %}
HTML Output
<label for="id">Text field label!</label>
<input type="text" name="name" id="id" value="value" class="form-control">