It is used as a nested tag of form-rules tag and it allows the configuration of the rules that will indicate what field values will make appear what form fields.
All of the rules nested in a form-rules tag, will be applied sequentially, that is, if the first field is the only one being displayed always (included in the displayAlways attribute of the form-rules tag) and it has a value that does not display the field2, no matter what the value of field2 is, it won't be displayed. Otherwise, if field2 is included as a displayAlways field, even if the value of the first field does not include this one, it will be displayed.
Attribute name | Description | Default | Required | Valid values |
fieldName | Name of the form field this rule applies to. | true | ||
pairs | JavaScript-like object that contains, for every value of the field fieldName that wants to be setup, the field names of the form elements that will be displayed when such a form field has that value. | true | i.e. 5 : ['input1', 'input6'], '4': ['input2'], 'anotherValue': ['input9']. You can have a look at the installation section to know about third party libraries that can help you creating this arrays. |
Note: all of the attributes accept runtime expressions.
Go here to see an example.