PT.Main.Bedingungen
The constraints panel contains options to check the value of form fields, when form fields should be visible and when they can be edited. Some constraints are available only for some element, see the list of element..
Properties
Name | Description |
---|---|
hidden if | Hides the form fieldm when a certain conditions is satisfied. |
visible if | Makes a form field that has been hidden visible again, when a certain condition is satisfied. |
read-only if | Locks a form field and disallows any input, when a certain condition is satisfied. |
editable if | Make a form field that has been set to read-only editable again, when a certain condition is satisfied. |
required if | Marks a form field as a required field, when a certain condition is satisfied. |
required group | Available only when the form field is a required field. Specifies the required group the form field should belong to. When two or more form fields belong to the same group, at least one of these form fields needs to be filled out, all other fields may remain empty. |
Condition
You can change a form field's visibility and read-only state depending on the value of another form element. The following conditions are available for the options hidden if, visible if, read-only if, editable if, and required if:
- has a value
- equals
- not equals
- lower than
- lower equal than
- greater than
- greater equal than
- between
- regular expression
Condition | Description |
---|---|
has a value | The conditions evaluates to true when the value of the form field is not empty. In particular, having a value mean the following for different form elements:
|
equals | The condition evaluates to true when the value of the form field equals the given value. Comparisons are case-sensitive. |
unequal | The condition evaluates to true when the value of the form field does not equal the given value. Comparisons are case-sensitive. |
lower than / lower or equal than | The condition evaluates to true when the value is lower (or equal) than the specified value. |
greater than / greater or equal than | The condition evaluates to true when the value is greater (or equal) than the specified value. |
between | The condition evaluates to true when the value is between the specified range, inclusively. The interval must be entered with a dash , for example 2-10. Negative numbers must be enclosed in parentheses, eg. (-10) - (- 5). |
regexp | The condition evaluates to true when the value matches the specified regexp. |
Empty automatically
For the properties hidden if and read-only if, you may choose whether the form field should be emptied automatically when it gets hidden or locked.
For example, consider the case of entering an address. The user can choose between a physical address and a post-office box, and only one input field is visible depending on the user's choice. When the form is submitted, a value should be send only for one of both fields. By selecting the empty automatically options, the input field post-office box will be cleared automatically when the user selects a physical address.
When emptying an element, all sub elements will be emptied as well. This applies to form elements of type page, container, and fieldset.