mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
SilverStripe\UserForms\Model\EditableFormField\EditableCountryDropdownField:
|
|
countryDropdown:
|
|
Name: CountrySelection
|
|
Title: "Choose your country"
|
|
DisplayRulesConjunction: And
|
|
ShowOnLoad: false
|
|
|
|
SilverStripe\UserForms\Model\EditableFormField\EditableTextField:
|
|
irdNumberField:
|
|
Name: IRDNumber
|
|
Title: "Enter your IRD Number"
|
|
countryTextField:
|
|
Name: CountryTextSelection
|
|
Title: "Enter your country (2 digit prefix)"
|
|
DisplayRulesConjunction: And
|
|
ShowOnLoad: false
|
|
|
|
SilverStripe\UserForms\Model\EditableCustomRule:
|
|
rule1:
|
|
Display: Show
|
|
ConditionOption: HasValue
|
|
FieldValue: NZ
|
|
ConditionField: =>SilverStripe\UserForms\Model\EditableFormField\EditableCountryDropdownField.countryDropdown
|
|
Parent: =>SilverStripe\UserForms\Model\EditableFormField\EditableTextField.irdNumberField
|
|
rule2:
|
|
Display: Show
|
|
ConditionOption: ValueGreaterThan
|
|
FieldValue: 1
|
|
ConditionField: =>SilverStripe\UserForms\Model\EditableFormField\EditableTextField.countryTextField
|
|
Parent: =>SilverStripe\UserForms\Model\EditableFormField\EditableTextField.irdNumberField
|