Skip Navigation

[Resolved] Passing fields from user to post fields

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

Problem: I would like to place information about the current logged-in User in a Form as the default field value.

Solution: You can use the wpv-user shortcode to place User information in the value attribute of a cred_field shortcode.

[cred_field name="some-field" value="[wpv-user field='user_firstname']"]

Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

This support ticket is created 5 years, 8 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)

This topic contains 2 replies, has 2 voices.

Last updated by Mario 5 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#1246601

Tell us what you are trying to do?

I want to pass the User-registration form - First/last name fields to a new Content form.

How do I set these fields in the content form?

#1246660

Hi, if the User is logged in when they go to the new post Form, you can use the wpv-user shortcode to place their information in the default value of the cred_field shortcode. You can do this in the new drag-and-drop form builder, or you can use the code below as a guide for expert mode:

[cred_field name="some-field" value="[wpv-user field='user_firstname']"]

For more information about the wpv-user field shortcode, please see here: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

#1250507

My issue is resolved now. Thank you!