Difference between revisions of "Integer form field type"

From Joomla! Documentation

m (Fixed category mess)
(No difference)

Revision as of 10:37, 20 May 2011

The integer parameter type provides a select box with a range of integer values. If the parameter 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 integer.
  • name (mandatory) is the unique name of the parameter.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • 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'.
  • first (mandatory) this value is the lowest on the list.
  • last (mandatory) this value is the highest on the list.
  • step (mandatory) each option will be in incrementation of this integer, based on the first value until last value is reached

Example XML parameter definition which would create a select box with the choices of 1,2,3,4,5,6,7,8,9,10:

<param name="myintegeralue" type="integer" default="Some integer" label="Choose an integer" description="" first="1" last="10" step="1" />

See also