This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Mohsin
Mohsin

I saw that secondaryTabs seems to render directly in the first tab.

So I tried:

# ===================================
#  Form Field Definitions
# ===================================
tabs:
    fields:
        intro:
            label: Intro
            tab: General

secondaryTabs:
    fields:
        name:
            label: Name
            tab: Personal

        work_phone:
            label: Work Phone
            tab: Business

And the result was this: Screenshot

Is there a way I can make these secondaryTabs nest under a different primary tab like instead of it being in General I want it in a tab called Info.

I’m not looking exactly for this but answering this would answer the question I’m seeking the answer to: which is how to make plugins that use addSecondaryTabs() function to extend and add fields to existing forms be nested under their own tab. Like the User Plus puts up all fields under a single tab called Profile. I do want all those fields under Profile tab but the fields must also have their own nested tabs. The phone, mobile, company fields should come under Contact sub-tab and the rest of the fields under Location sub-tab and all the fields inside Profile tab of User controller. Hope this makes sense?

Last updated

amorphine
amorphine

Hello Have you solved the issue?

Mohsin
candrabeqx
candrabeqx

you can customize the default layout, try to look into modules/backend/controllers/users/update.htm

quendi6063671
quendi6063671

cleanest solution is to use nestedform field type

daftspunky
daftspunky

That's right, the best approach would be to use the Nested Form form widget. More details are here:

https://octobercms.com/docs/backend/forms#widget-nestedform

1-6 of 6

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.