How to add custom heading for group of fields?

default discord avatar
generator101last year
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.

  • default discord avatar
    MichaelBOOMlast year

    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
  • default discord avatar
    generator101last year

    yes, this is it



    thank you

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.