1

I wrote several plugins and for each one exists a relative configuration form loaded by the onContentPrepareForm event using the $form->loadFile() method

Now each time I use this technique, Joomla creates a new tab in the backend article editor if value assigned to name attribute of fieldset tag is different. If same fieldset name is assigned into all of my forms, Joomla will create a monolithic tab which contains all fields inside a single fieldset whose name is the label of fieldset of first recognized plugin.

I want create a single tab where all my plugins insert a fieldset with a specific name, is there a clean way to get this behaviour with Joomla 4?

1 Answer 1

1

This may vary from form to form but using nested fieldsets appears to currently work in article backend form. It could break at some point though. Use the same top level fieldset name for all plugins and different second level fieldset names.

form1.xml:

<form>
    <fieldset name="top-level-fieldset" label="Top Level Fieldset">
        <fieldset name="second-level-fieldset-1" label="Second Level Fieldset 1">
            <field name="field1" type="text" label="Field 1" />
        </fieldset>
    </fieldset>
</form>

form2.xml:

<form>
    <fieldset name="top-level-fieldset" label="Top Level Fieldset">
        <fieldset name="second-level-fieldset-2" label="Second Level Fieldset 2">
            <field name="field2" type="text" label="Field 2" />
        </fieldset>
    </fieldset>
</form>

The end result: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.