Render different configuration types for ExtJs.
Name | Description |
---|---|
label | Default Label Field |
tagfield | Create a Tagfield with optional predefined options |
numberfield | Default Number Field. |
textfield | Simple Input Field |
select | Dropdown with predefined options |
key_value_repeater | Key-Value Repeater |
options_repeater | Options Repeater |
href | Href-Element for PIMCORE Documents |
--
Example
options.data:
display_group_id: base
type: tagfield
label: 'your label'
config: # optional. add a store for customer
store:
- ['val1', 'Value1']
- ['val2', 'Value2']
- ['val3', 'Value3']
--
--
--
--
--
--
Add your form type to one of these group fields (Context-Menu).
Name | Description |
---|---|
text_fields | -- |
choice_fields | -- |
datetime_fields | -- |
other_fields | -- |
field_groups | -- |
hidden_fields | -- |
buttons | -- |
Render your form type to a specific tab.
Name | Description |
---|---|
default | -- |
Render your form type to a specific display group.
Name | Description |
---|---|
base | -- |
attributes | -- |
Options Transformer will help you to generate valid options for backend and frontend. For example, the (complex) choices options need to be transformed for the ExtJs context for backend configuration.
This transformer will transform the options array into a valid backend configuration array and back.
Example
options.choices:
display_group_id: attributes
type: key_value_repeater
label: 'form_builder_type_field.choices'
options_transformer: FormBuilderBundle\Transformer\ChoicesTransformer
config: ~
If you want to define a default value, if the user leaves the field empty, you need the default value transformer.
In this example the field placeholder
needs to be a boolean if left empty. Also it should stay empty, if it's get reopened in backend.
Example
options.placeholder:
display_group_id: attributes
type: textfield
label: 'form_builder_type_field.placeholder'
options_transformer: FormBuilderBundle\Transformer\DefaultValueTransformer
config:
default_value: false