Unset required
See also: Set required, Form elements
Actions – Abstract
The action Set required removes the option 'required' at runtime for the linked Target element.
The action Set required removes the option 'required' at runtime for the linked Target element.
Without a link to a Target element, the action is not selectable under Action type.
The effect of deleting or setting the required property for a particular element depends on its properties and the surrounding hierarchy in the form (for details, see Set required).
The action is also available for Form elements for which the interactive deletion of the required property via the properties window in the Form designer is not supported.
Example
Master data for customer payment transactions are entered in a form. Depending on the country code (leading two characters) in the specified 'IBAN' (account number), the specification of a 'BIC' (SWIFT code of the bank) should be required or not. The starting point for the distinction is a positive list of SEPA country codes for which an IBAN without BIC is sufficient.
Runtime example:
Example |
Appearance in the form |
A bank transfer to Switzerland (CH) is possible via IBAN without BIC. |
|
For a bank transfer to the Seychelles (SC) the 'BIC' is a required field. |
|
Configuration:
|
For the Text field 'IBAN' the behaviour displayed on the left is configured:
►NOTE◄ With this configuration, the default setting of the option 'required' in the form design for the Text field 'BIC' at runtime is irrelevant, since the effective status is always determined by the action at runtime. However, this logic could be overridden by disabling the 'BIC' element or one of the parent containers, since an effectively inactive element is always considered 'valid' and can then remain empty despite the required field state. |