Skip Navigation

[Resolved] Custom user fields in another toolset form

This support ticket is created 5 years, 4 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#1357565

Tell us what you are trying to do?
I want a front end form for creating a meeting. In this form I would like a Select field (dropdown list) of a custom field from all the user accounts (essentially their business name).
Is something like this possible, and if so how?
I can see there is 'Get options from a shortcode' but I have no idea if/how that can do it.
thanks

#1357921

Hi Chris,

Thank you for waiting.

While reviewing the requirement that you've shared, I realized that there is a simpler and more flexible approach available to achieve this, which won't require any custom code.

This approach is explained in detail at this guide:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

Here is the brief summary:

1. You'll create a new post type "Business Profile" and whenever you'll add a new user on the website, you'll also add a new post item in this post type for that user. The title of this post item can be the business name of the user.

The basic information like username, email & password can be stored in each user's profile, while any additional details like a user's business name, contact info, address, etc can be stored with that user's "Business Profile" post.

2. Please make sure that when a new business profile is created for any user, he/she is selected as the author of that post.
( ref: hidden link )

This will form the connection between the WordPress user and a custom post type "Business Profile".

3. The benefit of this approach is that you'll be able to create post-relationships between the user's "Business Profile" and any other post type like "Meetings". It is important to note that post-relationships can't be created between the post types and the WordPress users, directly.

Here is a detailed guide on post-relationship:
https://toolset.com/documentation/post-relationships/

4. Once the "Business Profile" post type has been set up, you'll create a post-relationship between "Meetings" and the "Business Profile".

5. To connect a "Business Profile" and a "Meeting" you can use the Toolset Forms, as explained in this guide:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/

I'll recommend following the instructions in the listed order and in case any step is not clear, please let me know.

regards,
Waqar

#1360179

My issue is resolved now. Thank you!

#1365151

Thanks. I successfully got all the above working, but now I can't figure out how to display the form where the users can update their own profile.
As suggested, I moved all the extra profile info into a new post type, and have created a form to edit it, but how do I display it?
When I go to insert the shortcode I get the options of 'The current post' and 'Another post'. How do I have it edit the Profile post associated with the logged in user?
thanks