- Issue created by @murz
I read all the documentation here
https://www.drupal.org/docs/contributed-modules/formdazzle/form-elements →
https://www.drupal.org/docs/contributed-modules/formdazzle/form-and-form... →
https://www.drupal.org/docs/contributed-modules/formdazzle/miscellaneous... →
But for me it's still unclear how to add a new custom theme suggestion to the form element, could you please describe this?
For example, I have two fieldsets like this:
$form['my_fieldset_1'] = [
'#type' => 'fieldset',
'#title' => 'My fieldset 1',
];
$form['my_fieldset_2'] = [
'#type' => 'fieldset',
'#title' => 'My fieldset 2',
];
and want to use a single Twig template for both of them, named form-element--my-fieldset.html.twig
.
But it's unclear how to define this template to make it available in the suggestions?
I tried both options mentioned in the documentation:
'#theme' => 'my_fieldset',
and
'#theme_wrappers' => ['my_fieldset'],
but both of them don't work.
Could you please provide a working implementation? Thanks!
Active
4.0
Documentation