Set read only
See also: Enable element, Disable element, Form elements
Actions – Abstract
The Set read only action sets or clears the 'Read only' option for the linked Target element at runtime.
The Set read only action sets or clears the 'Read only' option for the linked Target element at runtime. This option must not be set if an element should be effectively editable (see note below). An element for which the 'Read only' option is set is always effectively read only. If it is also effectively active and effectively visible, it accepts certain interactions (accept focus, expand/collapse, select/copy content with Ctrl+C, etc.), but the value of the element cannot be changed. Regarding its visual appearance, the element shows no or little difference from being effectively editable.
The action can only be selected under Action type if a Target element is linked.
The selection for the Read only switch determines whether the 'Read only' option is set (ON, left) or removed (OFF, right).
The 'Read only' property is available for all Form elements.
►NOTE◄
Set read only with the Read only parameter 'ON' (Set read only):
The Set read only action (with Read only 'ON') always turns the Target element effectively read only at runtime.
If a Target Element of the Element containers type turns effectively read only, then all its direct child elements also turn effectively read only. If these are 'not set read only' themselves, they are then considered to be latently editable.
Access to an effectively read only element can be restricted by settings for additional options ('Active', 'Visible' – see Form elements) for the same or a parent element.
Set read only with the Read only parameter 'OFF' (cancel read only):
The Target element can only be effectively editable at runtime with the Set read only (with Read only 'OFF') if none of the Element containers on a parent level in the form design is 'set to read only'.
If a Target element of the Element containers type is effectively editable, then all the direct child elements that were previously 'not set read only' (i.e. latently editable) are also effectively editable.
Access to an effectively editable element can be restricted by settings for additional options ('Active', 'Visible' – see Form elements) for the same or a parent element.
Example
In a user registration form, the new user should enter an e-mail address as a unique identifier. If this address is validated, the input field should be set to 'read only' when the element loses the focus. At the same time, a button is activated that can be used to remove the read only protection for the 'E-mail' Text field for corrections.
Runtime example:
Situation |
View in the form |
Input of an invalid e-mail address (domain without TLD). |
|
Correct the e-mail address by inserting a dot in the domain. |
|
Configuration:
|
For the 'E-mail' Text field the behaviour shown on the left is configured to set the option 'Read only' for the field itself and the option 'Active' for the adjacent Button as desired:
|