Joomla spacer Form Field Type

Joomla spacer Form Field Type

The spacer form field type provides a visual separator between parameter field elements. It is purely a visual aid and no field value is stored.

XML Field Definition

<field type="spacer" name="myspacer" hr="true" />

Mandatory Parameters

  • type must be spacer.
  • name is the unique name of the field.

Optional Parameters

  • label (translatable) is the text to use as a spacer.
  • description (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
  • hr is whether to display a horizontal rule ('true' or 'false'). If this attribute is 'true', the label attribute will be ignored.
  • class is a CSS class name for the HTML form field.

You can replace the basic horizontal line with a title which can be used to group parameters. For example,

<field type="spacer" name="myspacer" label="Advanced parameters" />

You can also include HTML markup but it must be encoded. For example, to put the text into bold you can use:

<field type="spacer" name="myspacer" label="&lt;b&gt;Advanced parameters&lt;/b&gt;" />

You cannot combine the hr and label attributes. To define a spacer with both a horizontal rule and a label, use an encoded <hr/> in the label attribute. For example,

<field type="spacer" name="myspacer" label="&lt;hr/&gt;More parameters" />


Star ActiveStar ActiveStar ActiveStar ActiveStar Inactive