silverstripe-userforms/tests/Model/EditableFormFieldTest.yml
2019-01-28 14:58:55 +10:30

177 lines
4.8 KiB
YAML

SilverStripe\UserForms\Model\EditableFormField\EditableTextField:
basic-text:
Name: basic_text_name
Title: Basic Text Field
basic-text-2:
Name: basic_text_name
Title: Basic Text Field
required-text:
Name: required-text-field
Title: Required Text Field
CustomErrorMessage: Custom Error Message
Required: true
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\EditableTextField.countryTextField
Parent: =>SilverStripe\UserForms\Model\EditableFormField\EditableTextField.irdNumberField
rule-1:
Display: Hide
ConditionOption: HasValue
FieldValue: 6
SilverStripe\UserForms\Model\EditableFormField\EditableOption:
option-1:
Name: Option1
Title: Option 1
Value: Option 1
option-2:
Name: Option2
Title: Option 2
Value: Option 2
department-1:
Name: dept1
Title: sales@example.com
Value: sales@example.com
department-2:
Name: dept2
Title: accounts@example.com
Value: accounts@example.com
option-3:
Name: Option3
Title: Option 3
Value: Option 3
option-4:
Name: Option4
Title: Option 4
Value: Option 4
option-5:
Name: Option5
Title: Option 5
Value: Option 5
option-6:
Name: Option6
Title: Option 6
Value: Option 6
SilverStripe\UserForms\Model\Recipient\EmailRecipient:
recipient-1:
EmailAddress: test@example.com
EmailSubject: Email Subject
EmailFrom: no-reply@example.com
no-html:
EmailAddress: nohtml@example.com
EmailSubject: Email Subject
EmailFrom: no-reply@example.com
SendPlain: true
no-data:
EmailAddress: nodata@example.com
EmailSubject: Email Subject
EmailFrom: no-reply@example.com
HideFormData: true
SilverStripe\UserForms\Model\EditableFormField\EditableDropdown:
basic-dropdown:
Name: basic-dropdown
Title: Basic Dropdown Field
Options:
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.option-1
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.option-2
department-dropdown:
Name: department
Title: Department
Options:
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.department-1
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.department-2
SilverStripe\UserForms\Model\EditableFormField\EditableCheckbox:
checkbox-1:
Name: checkbox-1
Title: Checkbox 1
checkbox-2:
Name: checkbox-1
Title: Checkbox 1
checkbox-with-rule:
Name: checkbox-with-rule
Title: Checkbox with rule
DisplayRules: =>SilverStripe\UserForms\Model\EditableCustomRule.rule-1
SilverStripe\UserForms\Model\EditableFormField\EditableCheckboxGroupField:
checkbox-group:
Name: check-box-group
Title: Check box group
Options:
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.option-3
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.option-4
SilverStripe\UserForms\Model\EditableFormField\EditableEmailField:
email-field:
Name: email-field
Title: Email
SilverStripe\UserForms\Model\EditableFormField\EditableRadioField:
radio-field:
Name: radio-option
Title: Radio Option
Options:
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.option-5
- =>SilverStripe\UserForms\Model\EditableFormField\EditableOption.option-6
SilverStripe\UserForms\Model\EditableFormField\EditableFileField:
file-field:
Name: file-uploader
Title: Set file
SilverStripe\UserForms\Model\UserDefinedForm:
basic-form-page:
Title: User Defined Form
Fields: =>SilverStripe\UserForms\Model\EditableFormField\EditableTextField.basic-text
EmailRecipients:
- =>SilverStripe\UserForms\Model\Recipient\EmailRecipient.recipient-1
- =>SilverStripe\UserForms\Model\Recipient\EmailRecipient.no-html
- =>SilverStripe\UserForms\Model\Recipient\EmailRecipient.no-data
form-with-reset-and-custom-action:
Title: Form with Reset Action
SubmitButtonText: Custom Button
ShowClearButton: true
validation-form:
Title: Validation Form
Fields: =>SilverStripe\UserForms\Model\EditableFormField\EditableTextField.required-text
custom-rules-form:
Title: Custom Rules Form
Fields:
- =>SilverStripe\UserForms\Model\EditableFormField\EditableCheckbox.checkbox-with-rule
- =>SilverStripe\UserForms\Model\EditableFormField\EditableTextField.basic-text-2
empty-form:
Title: Empty Form