Skip Navigation

[Resolved] Use custom field of CPT in User Forms to capture the user input

This support ticket is created 2 years, 2 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 2 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#2480057

Use custom field of CPT in User Forms to capture the user input and store the same to the database. I have read the documentation that we can add custom fields to user forms, but I can't find a way to do the same.

Through this I want to store the user preferences.

#2480421

Hello,

There isn't such kind of built-in feature with Toolset Forms plugin, you can not add custom post field into user form, you might consider custom codes, for example:
After user fill and submit the user form, use action hook "cred_save_data" to trigger a custom PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
in this PHP function, save user input into database, for example:
https://developer.wordpress.org/reference/functions/update_post_meta/

#2481075

I want to create a form which is accepting user inputs based on CPT as shown on this weblink hidden link

#2482283

Toolset user forms can manage user fields, it can not manage post fields.

In your case, you might consider other other workarounds, for example use one custom post type as intermediate post type, use it to connect users with your custom post types, see our document:
https://toolset.com/course-lesson/how-to-create-custom-searches-and-relationships-for-users/