Text Area Field

Scripting Custom Views Form Helpers

The textarea_tag helper tag generates a text field.

  • name: The textarea's name attribute.
  • label: Adds label text above the text area field.
  • value: The starting value of the text area field. By default this will be empty.
  • id: The textarea's ID attribute. By default this will be set to the name, converted into a variable_name-style string.
  • rows: The number of rows of text the textarea should display without scrolling. By default this is 3.
Helper Tag
{% textarea_tag name: "name", label: "Text field label!", value: "value", id: "id", rows: 5 %}
HTML Output
<label for="id">Text field label!</label>
<textarea name="name" id="id" class="form-control" rows="5">
  value
</textarea>