Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
m-vo committed Jan 9, 2021
1 parent 9503c1a commit 7f367dd
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,31 @@ be specified.
$GLOBALS['TL_DCA']['tl_my_dca']['fields']['my_group_field'] = [
'inputType' => 'group',

// reference fields from the 'fields' key (see below) or other fields from
// this DCA that should be included in your group (defaults to elements of
// 'fields' key if not specified)
'palette' => ['title', 'element_select', 'singleSRC'],

// optionally inline some additional field definitions
// optionally inline some additional field definitions; please note that the
// definitions provided here will be merged with any of the same name in this
// DCA - this allows adjusting attributes for the use inside the group
'fields' => [
'static_element' => [
// your usual DCA definition
// new inline DCA definition
'inputType' => 'select',
'options' => ['Text Blocks', 'Hero Image', 'Foobar'],
],
],
'title' => [
// set some values, but take the rest from the existing definition
// under '$GLOBALS['TL_DCA']['tl_my_dca']['fields']['title']'
'eval' => ['mandatory' => false]
]
],

// reference fields from the 'fields' key (see above) or other fields from
// this DCA that should be included in your group (defaults to elements of
// 'fields' key if not specified)
'palette' => [
'title', // 1st group element (merged inline + sibling definition)
'static_element', // 2nd group element (inline definition)
'singleSRC' // 3rd group element (sibling definition)
],

// minimum/maximum number of group elements (both default to 0 = no restriction)
'min' => 1,
'max' => 5,
Expand Down

0 comments on commit 7f367dd

Please sign in to comment.