Standard field type Joomla XML – Password displays a plain text field with encryption for entering password data. When you enter data in this field, they are encrypted and replaced with asterisks.
Note that the data string is stored in params.ini as clear text and is not hidden by the hash function. This storage method is not secure for storing passwords.
This field looks like a regular text field on the form, but when data is entered, it is hidden by asterisks:
The field code looks like this:
Code language: YAML (yaml)
<field name="mypassword" type="password" default="secret" label="Введите пароль"/>
The following attributes are applicable to this field:
- name – the system name of the field.
- type – the type of the field, in this case «password».
- label – the display name of the field.
- description – the displayed field description. In Joomla 3, it is displayed as a tooltip when hovering over a field name.
- size – the width of the field, which is specified by the number of characters.
- default – sets the default value of the field.
- class – applied CSS field classes.
- lock – the value can be true or false. If the value is set to true, then the field will be locked initially, but next to it a “change” button will appear, by clicking on which you unlock the field and you can enter a password.
For now, that’s all there is to it about the Joomla XML field type – Password. If we receive new information, it will be added to this article.
Do you need help generating an XML file? Write to us at firstname.lastname@example.org and we will help you.