silverstripe-userforms/tests/Model/EditableCustomRuleTest.yml
2017-08-22 16:40:15 +12:00

31 lines
877 B
YAML

EditableFormField:
countryDropdown:
ClassName: EditableCountryDropdownField
Name: CountrySelection
Title: "Choose your country"
DisplayRulesConjunction: And
ShowOnLoad: false
irdNumberField:
ClassName: EditableTextField
Name: IRDNumber
Title: "Enter your IRD Number"
countryTextField:
ClassName: EditableTextField
Name: CountryTextSelection
Title: "Enter your country (2 digit prefix)"
DisplayRulesConjunction: And
ShowOnLoad: false
EditableCustomRule:
rule1:
Display: Show
ConditionOption: HasValue
FieldValue: NZ
ConditionField: =>EditableFormField.countryDropdown
Parent: =>EditableFormField.irdNumberField
rule2:
Display: Show
ConditionOption: ValueGreaterThan
FieldValue: 1
ConditionField: =>EditableFormField.countryTextField
Parent: =>EditableFormField.irdNumberField