Skip Navigation

[Resolved] User form generic field

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

Problem:

I want to access a generic field I have added to the user form.

I created a user forma and then a generic field called [Title - select "mr, mrs, ms"] and placed it in-front of the first name and last name. (See attached image)

Where is the user generic field (Title) stored so I can access it for a view?

Solution:

By default, Toolset form won't save the generic field into database.

You can try these:
https://toolset.com/forums/topic/user-form-generic-field/#post-1222883

Relevant Documentation:

This support ticket is created 5 years, 1 month 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 2 replies, has 2 voices.

Last updated by Mario 5 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1222805
user-form-generic-field.PNG

Tell us what you are trying to do?
I want to access a generic field I have added to the user form.

I created a user forma and then a generic field called [Title - select "mr, mrs, ms"] and placed it in-front of the first name and last name. (See attached image)

Where is the user generic field (Title) stored so I can access it for a view?

Do you have an example or tutorial showing how to access and display the generic user field.
or
An example of a user registration form with generic fields I can take a look at.

Thank you

#1222883

Hello,

By default, Toolset form won't save the generic field into database.

After user submit the form, you can use action hook cred_save_data to trigger a PHP function
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

in this function get the value of "Title" field:
hidden link

and save it into database as custom user field:
https://codex.wordpress.org/Function_Reference/update_user_meta

Then display it with view's shortcode [wpv-user] in front-end
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

#1225832

My issue is resolved now. Thank you!

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