Joomla XML Field Type – URL works in Joomla versions: 3.2 and higher.
Standard field type Joomla XML – Number displays a plain text box in HTML5 format with arrows, into which only numeric data can be entered.
When the page loads, the field displays the numbers that were previously saved in the form. If there is no saved data, when the page is loaded, the data is loaded from the attribute indicating the default value.
An example of displaying the Number field type in the Joomla 3 admin panel:
An example of displaying the Number field type in the Joomla 4 admin panel:
The code for the Number field from the image in the XML document looks like this:
This field supports attributes:
- name – system name of the field (field identifier).
- type – field type, in this case «number».
- 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.
- class – applied CSS field classes.
- default – sets the default value of the field.
- hint – adds a placeholder (hint) to the field.
- filter – sets the option for filtering data in the field.
- disabled – makes the field unavailable for editing. The value in the field is not saved. Variants can be true and false.
- readonly – sets the field to read-only mode, the value of the field cannot be changed. Variants can be true and false.
- required – sets the attribute of a required field. The form without filling in this field will not be able to be sent. Possible options are true and false.
- autocomplete – disables auto-filling for the field. To disable you need to specify a value for example autocomplete = “off”. To make autocomplete available, just remove this attribute.
- autofocus – sets autofocus to field after page load.
- size – the width of the text box in characters. If the field width is not specified, then it takes the value from the user’s browser. This attribute does not limit the number of characters entered.
- min – sets the minimum available numeric value.
- max – sets the maximum available numeric value.
- step – step of switching the numerical value to by pressing the arrows.
For now, that’s all there is to it about the Joomla XML field type – Number. If we receive new information, it will be added to this article.
Do you need help generating an XML file? Write to us at email@example.com and we will help you.