Skip Navigation

[Resolved] Select Field To Show Display Text, Not Custom field Content

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

Problem: I would like to display the text label instead of the option value from a select field in a User's profile.

Solution: You can use the Types usermeta shortcode to display the text label:

[types usermeta="my-select-field" user_current="true"][/types]

Relevant Documentation:
https://toolset.com/documentation/customizing-sites-using-php/functions/#select

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 Vincent 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1275889

I am trying to:
- use shortcode, [wpv-user field="my-select-field"] for a select field.

I expected to see:
- display text associated with the login user.

Instead, I got:
- custom field content associated with the login user.

Is there any way I can use a shortcode to get the display text associated and not the custom field content?

#1275993

Hi, you can use the Types usermeta shortcode to display the text label:

[types usermeta="my-select-field" user_current="true"][/types]

More examples and information here: https://toolset.com/documentation/customizing-sites-using-php/functions/#select

#1276223

My issue is resolved now. Thank you!