Skip Navigation

[Resolved] user data: proxy post or user data fields?

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to know if it is better to include User data in User fields in the User profile, or to create a proxy post type as explained in the documentation for post relationships and custom search for Users?

Solution: There are pros and cons for each approach. If you plan to use custom search Views to search for Users based on filtering by these custom fields, or if you plan to use Repeatable Field Groups for some of these fields, or if you plan to use post relationships to connect multiple Users to the same post, a proxy post type is probably required as explained in the documentation link below.

Relevant Documentation:
https://toolset.com/course-lesson/how-to-create-custom-searches-and-relationships-for-users/

This support ticket is created 2 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#2078457
Knipsel 3.PNG
Knipsel 2.PNG
Knipsel 1.PNG

Building some content-focused sites gave me experience with CPTs and views and templates. Now I'm building my first user-focussed site, involving user data and forms. I went through a number of lessons, but I still miss part of the big picture. I need some advice on some basic architectural decisions.

My case: I'm building a LARP community game site. The game engine backend will be on a separate server. This site is the participant-focussing part.

Apart from admin-generated content, the key user content is:
1) standard wordpress user data
2) participant profile, containg rich media (user fields, text, images, movies), editable by participant, readable by everyone, will be used for several views.
3) participant scores, limited number of fields, editable by admins (not participants!), readable by concerning participant only

At this moment, my most pressing question is: In my use case, what data should I put where? Should I add all this data as user data fields (in the particpant user profiles) or is it better to create a proxy CPT "Participant" and data 2) and 3) in this? Or two different CPTs, "participant profile" and "participant scores"? Or combine 3) with 1) in user data fields and 2) as CPT?

As second question: A related practical issue is that I can't succeed to create a user form to edit user data. I have create some custom user data fields for user role Deelnemer (=particiapant), but one way or the other, the From Editor does not show any option to edit them. See the screen shots. I guess I miss something, but what??? (BTW, I checked the HTML of the admin page, a quite some stuff is 'hidden', not sure if that is related to this issue)

#2078605

Hello, I'll give you some brief answers here and if you need more information we can create some separate tickets to discuss in more detail.

In my use case, what data should I put where? Should I add all this data as user data fields (in the particpant user profiles) or is it better to create a proxy CPT "Participant" and data 2) and 3) in this?
If you plan to allow your site visitors to search for users using the criteria in these custom fields, a proxy post type "Participant" is required because there is no way to create custom searches for User Profiles with filters based on custom fields. If you plan to connect multiple Users to the same post somehow, the most practical way to handle this is with post relationships, so a Participant proxy post type is usually best. Otherwise it's not very intuitive to connect Users and posts, other than as post author. Only one user can be the post author of any post, so linking multiple Users to the same post is not possible in that scenario. If you want to utilize Repeatable Field Groups (RFGs) to handle any of these fields, then a proxy Participants post type is required as RFGs cannot be used in User profiles. So with all those things in mind, I usually recommend a proxy post type for more supporting more advanced User profile information, custom parametric search for Users, and post relationships.

Or two different CPTs, "participant profile" and "participant scores"? Or combine 3) with 1) in user data fields and 2) as CPT?
I would not generally recommend multiple CPTs here. If the main reason for separating this content is to facilitate hiding fields from certain Users, you can usually manage that with conditionals in your templates or separate Forms for managing content. A separate post type will overly complicate things in my opinion.

A related practical issue is that I can't succeed to create a user form to edit user data.
This looks like a server-side issue or a compatibility problem with a theme or other plugin. To test this out, try these troubleshooting steps:
- Try turning Expert Mode on and off to see if it fixes the problem. Expert mode should show a text editor with shortcodes. Non-expert mode should show a drag-and-drop Form builder interface with the Form builder on the left and available fields on the right.
- Ensure your Toolset plugins and WordPress installation are up-to-date.
- Temporarily activate a default theme like Twenty Twenty One
- Temporarily deactivate any custom code snippets in Toolset > Settings > Custom Code
- Temporarily deactivate all 3rd-party plugins except Types, Forms, and Blocks (or Views if you use the legacy Views plugin)
- Test the Form builder again
- If the problem is resolved, reactivate your theme, custom code snippets, and other plugins, one by one, testing each time until the problem returns. If the problem can be isolated to one or two components activated with Forms, we can investigate that as a compatibility issue. There may be a configuration problem we can resolve, or there may be a conflict our developers can resolve with their developers.
- if the problem is not resolved, there could be a server-side error preventing this page from loading correctly, or something else unexpected. We should investigate this issue in a separate ticket.

#2079113

Thanks Christian,

Wrt to the user data fields, thanks for your comments. I'll pursue the proxy post approach. At this point no further questions, but no doubt I'll run into issues and if needed I'll start a new topic.

Wrt invisibility of the user data fields in the form editor: the expert view doesn't change anything, except that it changes color to orange. I'll run the other tests that you suggest.

Kind regards,

Joost

#2079451

OK thanks, I will stand by for your update and we can try additional troubleshooting if necessary for the Form builder page.

#2079491

Hi Christian, it turned out that I had I small backlog of updates indeed. I'm not sure which one made the difference, but now I see the form editor.

I'm fine for now. If other questions arise I'll open a new ticket. Thanks for your prompt support!!!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.