You are here

yamlform.yamlform.example_elements.yml in YAML Form 8

modules/yamlform_examples/config/install/yamlform.yamlform.example_elements.yml

File

modules/yamlform_examples/config/install/yamlform.yamlform.example_elements.yml
View source
  1. langcode: en
  2. status: false
  3. dependencies:
  4. enforced:
  5. module:
  6. - yamlform_examples
  7. uid: null
  8. template: false
  9. id: example_elements
  10. title: 'Example: Elements'
  11. description: 'Examples of every supported <a href="https://api.drupal.org/api/drupal/elements">form element</a>.'
  12. elements: |
  13. basic_elements:
  14. '#type': details
  15. '#title': 'Basic elements'
  16. '#open': true
  17. checkbox:
  18. '#type': checkbox
  19. '#title': Checkbox
  20. hidden:
  21. '#type': hidden
  22. '#title': Hidden
  23. password:
  24. '#type': password
  25. '#title': Password
  26. textarea:
  27. '#type': textarea
  28. '#title': Textarea
  29. textfield:
  30. '#type': textfield
  31. '#title': 'Text field'
  32. advanced_elements:
  33. '#type': details
  34. '#title': 'Advanced elements'
  35. '#open': true
  36. yamlform_autocomplete:
  37. '#type': autocomplete
  38. '#title': Autocomplete
  39. '#autocomplete_items': country_names
  40. captcha:
  41. '#type': captcha
  42. '#title': CAPTCHA
  43. yamlform_codemirror:
  44. '#type': codemirror
  45. '#title': CodeMirror
  46. '#mode': yaml
  47. color:
  48. '#type': color
  49. '#title': Color
  50. yamlform_creditcard_number:
  51. '#type': creditcard_number
  52. '#title': 'Credit card number'
  53. email:
  54. '#type': email
  55. '#title': Email
  56. yamlform_email_confirm:
  57. '#type': email_confirm
  58. '#title': 'Email confirm'
  59. yamlform_email_multiple:
  60. '#type': email_multiple
  61. '#title': 'Email multiple'
  62. number:
  63. '#type': number
  64. '#title': Number
  65. '#min': 0
  66. '#max': 10
  67. '#step': 1
  68. password_confirm:
  69. '#type': password_confirm
  70. '#title': 'Password confirm'
  71. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/1427838">Issue #1427838: password and password_confirm children do not pick up #states or #attributes</a>'
  72. range:
  73. '#type': range
  74. '#title': Range
  75. '#min': 0
  76. '#max': 100
  77. '#step': 1
  78. '#range__output': true
  79. '#range__output_prefix': $
  80. '#range__output_suffix': '.00'
  81. yamlform_rating:
  82. '#type': rating
  83. '#title': Rating
  84. search:
  85. '#type': search
  86. '#title': Search
  87. yamlform_signature:
  88. '#type': signature
  89. '#title': Signature
  90. tel:
  91. '#type': tel
  92. '#title': Telephone
  93. text_format:
  94. '#type': text_format
  95. '#title': 'Text format'
  96. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/997826">Issue #997826: #states doesn''t work correctly with type text_format</a><br/><a href="https://www.drupal.org/node/2625128">Issue #2625128: Text format selection stays visible when using editor and a hidden form state</a><br/><a href="https://www.drupal.org/node/1954968">Issue #1954968: Required CKEditor fields always fail HTML5 validation</a>'
  97. yamlform_toggle:
  98. '#type': toggle
  99. '#title': Toggle
  100. url:
  101. '#type': url
  102. '#title': URL
  103. value:
  104. '#type': value
  105. '#title': Value
  106. file_upload_elements:
  107. '#type': details
  108. '#title': 'File upload elements'
  109. '#open': true
  110. yamlform_audio_file:
  111. '#type': audio_file
  112. '#title': 'Audio file'
  113. yamlform_document_file:
  114. '#type': document_file
  115. '#title': 'Document file'
  116. yamlform_image_file:
  117. '#type': image_file
  118. '#title': 'Image file'
  119. managed_file:
  120. '#type': managed_file
  121. '#title': 'Managed file'
  122. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/2705471">Issue #2705471: Form states managed file fields</a><br/><a href="https://www.drupal.org/node/2113931">Issue #2113931: File Field design update</a>'
  123. yamlform_video_file:
  124. '#type': video_file
  125. '#title': 'Video file'
  126. options_elements:
  127. '#type': details
  128. '#title': 'Options elements'
  129. '#open': true
  130. yamlform_buttons:
  131. '#type': buttons
  132. '#title': Buttons
  133. '#options':
  134. One: One
  135. Two: Two
  136. Three: Three
  137. yamlform_buttons_other:
  138. '#type': buttons_other
  139. '#title': 'Buttons other'
  140. '#options':
  141. One: One
  142. Two: Two
  143. Three: Three
  144. checkboxes:
  145. '#type': checkboxes
  146. '#title': Checkboxes
  147. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/994360">Issue #994360: #states cannot disable/enable radios and checkboxes</a><br/><a href="https://www.drupal.org/node/2836364">Issue #2836364: Wrapper attributes are not supported by composite elements, this includes radios, checkboxes, and buttons.</a>'
  148. '#options':
  149. One: One
  150. Two: Two
  151. Three: Three
  152. yamlform_checkboxes_other:
  153. '#type': checkboxes_other
  154. '#title': 'Checkboxes other'
  155. '#options':
  156. One: One
  157. Two: Two
  158. Three: Three
  159. yamlform_likert:
  160. '#type': likert
  161. '#title': Likert
  162. '#questions':
  163. q1: 'Please answer question 1?'
  164. q2: 'How about now answering question 2?'
  165. q3: 'Finally, here is question 3?'
  166. '#answers':
  167. 1: 1
  168. 2: 2
  169. 3: 3
  170. 4: 4
  171. 5: 5
  172. radios:
  173. '#type': radios
  174. '#title': Radios
  175. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/2731991">Issue #2731991: Setting required on radios marks all options required</a><br/><a href="https://www.drupal.org/node/994360">Issue #994360: #states cannot disable/enable radios and checkboxes</a><br/><a href="https://www.drupal.org/node/2836364">Issue #2836364: Wrapper attributes are not supported by composite elements, this includes radios, checkboxes, and buttons.</a>'
  176. '#options':
  177. One: One
  178. Two: Two
  179. Three: Three
  180. yamlform_radios_other:
  181. '#type': radios_other
  182. '#title': 'Radios other'
  183. '#options':
  184. One: One
  185. Two: Two
  186. Three: Three
  187. select:
  188. '#type': select
  189. '#title': Select
  190. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/1426646">Issue #1426646: "-Select-" option is lost when form elements uses ''#states''</a><br/><a href="https://www.drupal.org/node/1149078">Issue #1149078: States API doesn''t work with multiple select fields</a><br/><a href="https://www.drupal.org/node/2791741">Issue #2791741: FAPI states: fields aren''t hidden initially when depending on multi-value selection</a>'
  191. '#options':
  192. One: One
  193. Two: Two
  194. Three: Three
  195. yamlform_select_other:
  196. '#type': select_other
  197. '#title': 'Select other'
  198. '#options':
  199. One: One
  200. Two: Two
  201. Three: Three
  202. tableselect:
  203. '#type': tableselect
  204. '#title': 'Table select'
  205. '#options':
  206. One: One
  207. Two: Two
  208. Three: Three
  209. yamlform_tableselect_sort:
  210. '#type': tableselect_sort
  211. '#title': 'Tableselect sort'
  212. '#options':
  213. One: One
  214. Two: Two
  215. Three: Three
  216. yamlform_table_sort:
  217. '#type': table_sort
  218. '#title': 'Table sort'
  219. '#options':
  220. One: One
  221. Two: Two
  222. Three: Three
  223. yamlform_toggles:
  224. '#type': toggles
  225. '#title': Toggles
  226. '#options':
  227. One: One
  228. Two: Two
  229. Three: Three
  230. containers:
  231. '#type': details
  232. '#title': Containers
  233. '#open': true
  234. container:
  235. '#type': container
  236. '#title': Container
  237. container_content:
  238. '#markup': 'This is a Container container.'
  239. details:
  240. '#type': details
  241. '#title': Details
  242. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/2348851">Issue #2348851: Regression: Allow HTML tags inside detail summary</a>'
  243. details_content:
  244. '#markup': 'This is a Details container.'
  245. fieldset:
  246. '#type': fieldset
  247. '#title': Fieldset
  248. fieldset_content:
  249. '#markup': 'This is a Fieldset container.'
  250. item:
  251. '#type': item
  252. '#title': Item
  253. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/783438">Issue #783438: #states doesn''t work for #type item</a>'
  254. '#markup': '{markup}'
  255. '#field_prefix': '{field_prefix}'
  256. '#field_suffix': '{field_suffix}'
  257. item_content:
  258. '#markup': 'This is a Item container.'
  259. label:
  260. '#type': label
  261. '#title': Label
  262. label_content:
  263. '#markup': 'This is a Label container.'
  264. date_time_elements:
  265. '#type': details
  266. '#title': 'Date/time elements'
  267. '#open': true
  268. date:
  269. '#type': date
  270. '#title': Date
  271. datetime:
  272. '#type': datetime
  273. '#title': Date/time
  274. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/2419131">Issue #2419131: #states attribute does not work on #type datetime</a>'
  275. datelist:
  276. '#type': datelist
  277. '#title': 'Date list'
  278. yamlform_time:
  279. '#type': time
  280. '#title': Time
  281. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/1838234">Issue #1838234: Add jQuery Timepicker for the Time element of the datetime field</a>'
  282. entity_reference_elements:
  283. '#type': details
  284. '#title': 'Entity reference elements'
  285. '#open': true
  286. entity_autocomplete:
  287. '#type': entity_autocomplete
  288. '#title': 'Entity autocomplete'
  289. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/2826451">Issue #2826451: TermSelection returning HTML characters in select list</a>'
  290. '#target_type': user
  291. '#selection_handler': 'default:user'
  292. '#selection_settings':
  293. include_anonymous: true
  294. yamlform_entity_checkboxes:
  295. '#type': entity_checkboxes
  296. '#title': 'Entity checkboxes'
  297. '#target_type': user
  298. '#selection_handler': 'default:user'
  299. '#selection_settings':
  300. include_anonymous: true
  301. yamlform_entity_radios:
  302. '#type': entity_radios
  303. '#title': 'Entity radios'
  304. '#target_type': user
  305. '#selection_handler': 'default:user'
  306. '#selection_settings':
  307. include_anonymous: true
  308. yamlform_entity_select:
  309. '#type': entity_select
  310. '#title': 'Entity select'
  311. '#target_type': user
  312. '#selection_handler': 'default:user'
  313. '#selection_settings':
  314. include_anonymous: true
  315. markup_elements:
  316. '#type': details
  317. '#title': 'Markup elements'
  318. '#open': true
  319. yamlform_markup:
  320. '#type': markup
  321. '#title': 'HTML markup'
  322. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/2700667">Issue #2700667: Notice: Undefined index: #type in drupal_process_states()</a>'
  323. yamlform_markup_content:
  324. '#markup': 'This is a HTML markup container.'
  325. yamlform_message:
  326. '#type': message
  327. '#title': Message
  328. '#description': '<b>Known Issues:</b><br/><a href="https://www.drupal.org/node/77245">Issue #77245: A place for JavaScript status messages</a>'
  329. '#message_type': warning
  330. '#message_message': 'This is a <strong>warning</strong> message.'
  331. yamlform_message_content:
  332. '#markup': 'This is a Message container.'
  333. processed_text:
  334. '#type': processed_text
  335. '#title': 'Processed text'
  336. processed_text_content:
  337. '#markup': 'This is a Processed text container.'
  338. other_elements:
  339. '#type': details
  340. '#title': 'Other elements'
  341. '#open': true
  342. yamlform_element:
  343. '#type': element
  344. '#title': 'Generic element'
  345. language_select:
  346. '#type': language_select
  347. '#title': 'Language select'
  348. '#languages': 3
  349. machine_name:
  350. '#type': machine_name
  351. '#title': 'Machine name'
  352. css: ''
  353. javascript: ''
  354. settings:
  355. page: true
  356. page_submit_path: ''
  357. page_confirm_path: ''
  358. form_submit_label: ''
  359. form_submit_attributes: { }
  360. form_exception_message: ''
  361. form_closed_message: ''
  362. form_confidential: false
  363. form_confidential_message: ''
  364. form_prepopulate: false
  365. form_prepopulate_source_entity: false
  366. form_novalidate: false
  367. form_unsaved: false
  368. form_disable_back: false
  369. form_autofocus: false
  370. form_details_toggle: false
  371. wizard_progress_bar: true
  372. wizard_progress_pages: false
  373. wizard_progress_percentage: false
  374. wizard_next_button_label: ''
  375. wizard_next_button_attributes: { }
  376. wizard_prev_button_label: ''
  377. wizard_prev_button_attributes: { }
  378. wizard_start_label: ''
  379. wizard_complete: true
  380. wizard_complete_label: ''
  381. preview: 0
  382. preview_next_button_label: ''
  383. preview_next_button_attributes: { }
  384. preview_prev_button_label: ''
  385. preview_prev_button_attributes: { }
  386. preview_message: ''
  387. draft: false
  388. draft_auto_save: false
  389. draft_button_label: ''
  390. draft_button_attributes: { }
  391. draft_saved_message: ''
  392. draft_loaded_message: ''
  393. confirmation_type: page
  394. confirmation_message: ''
  395. confirmation_url: ''
  396. confirmation_attributes: { }
  397. confirmation_back: true
  398. confirmation_back_label: ''
  399. confirmation_back_attributes: { }
  400. limit_total: null
  401. limit_total_message: ''
  402. limit_user: null
  403. limit_user_message: ''
  404. entity_limit_total: null
  405. entity_limit_user: null
  406. results_disabled: false
  407. results_disabled_ignore: false
  408. token_update: false
  409. access:
  410. create:
  411. roles:
  412. - anonymous
  413. - authenticated
  414. users: { }
  415. view_any:
  416. roles: { }
  417. users: { }
  418. update_any:
  419. roles: { }
  420. users: { }
  421. delete_any:
  422. roles: { }
  423. users: { }
  424. purge_any:
  425. roles: { }
  426. users: { }
  427. view_own:
  428. roles: { }
  429. users: { }
  430. update_own:
  431. roles: { }
  432. users: { }
  433. delete_own:
  434. roles: { }
  435. users: { }
  436. handlers: { }