Like what we’re doing? Star us on GitHub!

How to add custom heading for group of fields?

generator101
3 weeks ago
3

I am trying to add a custom heading for group of fields, is there an option to do that? So I want to create a heading called "Information" and under it, have Username, password and etc. Another heading called "Contact Info" and have the email, phone and etc. Right now all the fields show right after each other, but I want to group them.

  • MichaelBOOM
    3 weeks ago

    Hey there!


    I believe what you are looking for is the Group Field. It required a name and fields attribute and will take the name property as the heading and also as the name of the object it's fields will be put in. This is also the structure it will have when you query the field.



    You can find a link to the documentation below. If you have any further questions, don't hesitate to contact me and I'll do my best to help you :)



    https://payloadcms.com/docs/fields/group
  • generator101
    3 weeks ago

    yes, this is it



    thank you

Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More