src/components/fsk/form/forms/form
// src/components/fsk/form/forms/form/schema.yaml
$schema: http://json-schema.org/draft-07/schema#
$id: /fsk/form
additionalProperties: false
properties:
attributes:
type: object
children:
type: string
format: html
required:
- children
// src/components/fsk/form/forms/form/mocks.yaml
attributes:
$drupal: true
children:
$render:
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#input'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#select'
- $tpl: '@fsk/form/checkboxes'
$ref: '@fsk/form/checkboxes#row'
- $tpl: '@fsk/form/radios'
$ref: '@fsk/form/radios#row'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#textarea'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#checkbox'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#radio'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#submit'
// src/components/fsk/form/forms/form/form.html.twig
<form{{ attributes ? attributes|without("class") : "" }} class="FskForm {{ attributes.class }}">
{{ children }}
</form>
default mock data
attributes:
$drupal: true
children:
$render:
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#input'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#select'
- $tpl: '@fsk/form/checkboxes'
$ref: '@fsk/form/checkboxes#row'
- $tpl: '@fsk/form/radios'
$ref: '@fsk/form/radios#row'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#textarea'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#checkbox'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#radio'
- $tpl: '@fsk/form/form-element'
$ref: '@fsk/form/form-element#submit'