Joomla XML Standard Field Type – Spacer

Joomla XML Field Type – URL works in Joomla versions: 2.5 and higher.

Standard field type Joomla XML – Spacer displays a visual separator between fields in a form, which has several display types. Can be a regular line separator or text as a separator. Consider each below.

Option 1: Line Separator:

This type of separator has the same appearance in both Joomla 3 and Joomla 4 versions.

Joomla XML Standard Field Type - Spacer - Line Type

The line code of the Spacer field from the image in the XML document looks like this:

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

Option 2: Text Separator:

An example of displaying the Spacer field type in the Joomla 3 admin panel:

Joomla 3 XML Standard Field Type - Spacer - Text Separator

An example of displaying the Spacer field type in the Joomla 4 admin panel:

Joomla 4 XML Standard Field Type - Spacer - Text Separator

The Spacer field code as a text separator from the image in the XML document looks like this:

				
					<field
       name="myspacer"
       type="spacer"
       label="Field title"
       description="Field description"/>
				
			

This field type supports attributes:

  • name – system name of the field (field identifier).
  • type – the type of the field, in this case «spacer».
  • label – display name of the field.
  • description – the displayed description of the field. In Joomla 3 it is displayed as a tooltip when hovering over a field name.
  • hr – responsible for displaying a horizontal line. Values can be true or false. If the option is set to true, then the value from the label attribute will be ignored.
  • class – applied CSS field classes.

For now, that’s all there is to it about the Joomla XML field type – Spacer. If we receive new information, it will be added to this article.

Do you need help generating an XML file? Write to us at admin@iws.by and we will help you.

Leave a Reply