yamlform.yamlform.example_elements_states.yml in YAML Form 8
modules/yamlform_examples/config/install/yamlform.yamlform.example_elements_states.yml
File
modules/yamlform_examples/config/install/yamlform.yamlform.example_elements_states.ymlView source
- langcode: en
- status: false
- dependencies:
- enforced:
- module:
- - yamlform_examples
- uid: null
- template: false
- id: example_elements_states
- title: 'Example: Elements: Condition Logic'
- description: 'Examples of elements using conditional logic.'
- elements: |
- checkbox_example:
- '#type': details
- '#title': 'Checkbox example'
- '#open': true
- checkbox:
- '#type': checkbox
- '#title': 'Please check this box'
- checkbox_explain:
- '#type': textarea
- '#title': 'Please explain why you checked the above box'
- '#states':
- visible:
- ':input[name="checkbox"]':
- checked: true
- required:
- ':input[name="checkbox"]':
- checked: true
- select_example:
- '#type': details
- '#title': 'Select with other example'
- '#open': true
- select:
- '#type': select
- '#title': 'Please select ''other'' in the below select menu.'
- '#options':
- 1: One
- 2: Two
- 3: Three
- other: 'Other...'
- select_other:
- '#type': textfield
- '#attributes':
- placeholder: 'Enter other...'
- '#states':
- visible:
- ':input[name="select"]':
- value: other
- required:
- ':input[name="select"]':
- value: other
- select_multiple_example:
- '#type': details
- '#title': 'Select multiple example'
- '#open': true
- select_multiple:
- '#type': select
- '#title': 'Please select ''One'' or ''Two'' in the below select menu.'
- '#options':
- 1: One
- 2: Two
- 3: Three
- 4: Four
- select_multiple_other:
- '#type': textfield
- '#attributes':
- placeholder: 'Enter other...'
- '#states':
- visible:
- - ':input[name="select_multiple"]':
- - value: 1
- - or
- - ':input[name="select_multiple"]':
- - value: 2
- required:
- - ':input[name="select_multiple"]':
- - value: 1
- - or
- - ':input[name="select_multiple"]':
- - value: 2
- radios_example:
- '#type': details
- '#title': 'Radio buttons with other example'
- '#open': true
- radios:
- '#type': radios
- '#title': 'Please select ''other'' from the below radio buttons.'
- '#options':
- 1: One
- 2: Two
- 3: Three
- other: 'Other...'
- radios_other:
- '#type': textfield
- '#attributes':
- placeholder: 'Enter other...'
- '#states':
- visible:
- ':input[name="radios"]':
- value: other
- required:
- ':input[name="radios"]':
- value: other
- checkbox_more_example:
- '#type': details
- '#title': 'Checkbox with more information example'
- '#open': true
- checkbox_more:
- '#type': checkbox
- '#title': 'Please check this box to enter more information'
- checkbox_more_details:
- '#type': 'details'
- '#title': 'More information'
- '#open': true
- '#states':
- expanded:
- ':input[name="checkbox_more"]':
- checked: true
- checkbox_more_first_name:
- '#type': textfield
- '#title': 'First name'
- '#states':
- required:
- ':input[name="checkbox_more"]':
- checked: true
- checkbox_more_last_name:
- '#type': textfield
- '#title': 'Last name'
- '#states':
- required:
- ':input[name="checkbox_more"]':
- checked: true
- filled_example:
- '#type': details
- '#title': 'Text field filled example'
- '#open': true
- filled:
- '#type': textfield
- '#title': 'Fill in the below text field to enable and require the next text field.'
- filled_next:
- '#type': textfield
- '#title': 'The next text field'
- '#states':
- enabled:
- ':input[name="filled"]':
- filled: true
- required:
- ':input[name="filled"]':
- filled: true
- css: ''
- javascript: ''
- settings:
- page: true
- page_submit_path: ''
- page_confirm_path: ''
- form_submit_label: ''
- form_submit_attributes: { }
- form_exception_message: ''
- form_closed_message: ''
- form_confidential: false
- form_confidential_message: ''
- form_prepopulate: false
- form_prepopulate_source_entity: false
- form_novalidate: false
- form_unsaved: false
- form_disable_back: false
- form_autofocus: false
- form_details_toggle: false
- wizard_progress_bar: true
- wizard_progress_pages: false
- wizard_progress_percentage: false
- wizard_next_button_label: ''
- wizard_next_button_attributes: { }
- wizard_prev_button_label: ''
- wizard_prev_button_attributes: { }
- wizard_start_label: ''
- wizard_complete: true
- wizard_complete_label: ''
- preview: 0
- preview_next_button_label: ''
- preview_next_button_attributes: { }
- preview_prev_button_label: ''
- preview_prev_button_attributes: { }
- preview_message: ''
- draft: false
- draft_auto_save: false
- draft_button_label: ''
- draft_button_attributes: { }
- draft_saved_message: ''
- draft_loaded_message: ''
- confirmation_type: page
- confirmation_message: ''
- confirmation_url: ''
- confirmation_attributes: { }
- confirmation_back: true
- confirmation_back_label: ''
- confirmation_back_attributes: { }
- limit_total: null
- limit_total_message: ''
- limit_user: null
- limit_user_message: ''
- entity_limit_total: null
- entity_limit_user: null
- results_disabled: false
- results_disabled_ignore: false
- token_update: false
- access:
- create:
- roles:
- - anonymous
- - authenticated
- users: { }
- view_any:
- roles: { }
- users: { }
- update_any:
- roles: { }
- users: { }
- delete_any:
- roles: { }
- users: { }
- purge_any:
- roles: { }
- users: { }
- view_own:
- roles: { }
- users: { }
- update_own:
- roles: { }
- users: { }
- delete_own:
- roles: { }
- users: { }
- handlers: { }