New Layout Field Container

Support MB Frontend Submission New Layout Field ContainerResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43371
    Gerard HalliganGerard Halligan
    Participant

    Hi,

    I need a way to group fields in a container, so I can apply css to that container. If you could add a new layout field called container, that doesn't have any other functionality, except to group the fields added within it.
    I can't use the group layout, as this changes how the data is saved in the postmeta.

    Adding this would mean we could easily modify the frontend submission form to look how we want.

    Thanks,
    Ger

    #43379
    PeterPeter
    Moderator

    Hello Ger,

    I think you can add a custom class for the field group then apply CSS code for that field group based on the custom class. Screenshot https://monosnap.com/file/33zF2RjyK5ItFQA3SevQOujANl6cA4
    Refer documentation https://docs.metabox.io/creating-fields-with-code/

    #43382
    Gerard HalliganGerard Halligan
    Participant

    Hi Peter,

    Thanks for looking at this.

    I did try that initially, and I was able to style the form correctly, but the issue with using groups is that it changes how the data is saved in the db. The CPT already has data in it, so I need a layout that only wraps the fields in a DIV. but they are still saved as individual meta keys and values.

    But, I had a look at your links and that reminded me of the before and after options. I can use them to add in a div, around the fields I want to group, so I guess it's not needed. It would look nice though, if you could see the grouping in the designer 😉

    Thanks for your help
    Ger

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.