Hi, I'm creating a lot of single-field User Forms to present on the front-end... and wonder what the best practice is: when to create a new User Field Group vs using an existing one?
Should I create a new User Field Group for every User Form that I need?
Or is it okay to just add all of my User Fields into one User Field Group then hide all of the fields that I don't need for that particular form?
Or something in between...?
Just to add an example context... I will have 50 online courses, each with 20 User Fields. For each course: 10 forms will have 1 field each. 2 forms will have 2 fields each. And 1 form will have 6 fields.
Currently I am lumping all of my User Fields for one course into one User Field Group. This will give me 50 different User Field Groups total, with 20 fields each. However... if it's a better practice to use a greater number of User Field Groups, please let me know how you suggest I organize them.
The only disadvantages to using fewer User Field Groups would be that if you visit the user profile page on the back-end the fields all appear together and not in organised meta-boxes, and when creating the forms and using the auto-generate feature, you have a lot of unwanted fields to turn off. (You are not really hiding them, you are simply not including them in the form.)
I can envisage that there could be a performance disadvantage to more User Field Groups, but I'd have to set up a test site with lots of groups and use Query Monitor to assess whether there were additional queries when rendering the form when using fields from multiple groups.
In any case, the performance impact would likely be very small, and you are leaning towards using less not more groups, so lean away.