Actions

Textarea form field type

From Joomla! Documentation

Revision as of 08:46, 21 May 2011 by Mvangeest (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Params.textarea.jpg

The textarea form field type provides a text area for entry of multi-line text. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.

  • type (mandatory) must be textarea.
  • name (mandatory) is the unique name of the field.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • rows (mandatory) is the height of the visible text area in lines. If omitted the width is determined by the browser. The value of rows does not limit the number of lines that may be entered.
  • cols (mandatory) is the width of the visible text area in characters. If omitted the width is determined by the browser. The value of cols does not limit the number of characters that may be entered.
  • default (optional) (translatable) is the default value.
  • description (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
  • class (optional) is a CSS class name for the HTML form field. If omitted this will default to 'text_area'.

Example XML field definition:

<field name="mytextarea" type="textarea" default="default" label="Enter some text" description="" rows="10" cols="5" />

Tips

  • If you need to line break just encode <br /> in the XML config file like this: &lt;br /&gt;

See also