Skip Navigation

[Resolved] I want to display the drop down field's value

This support ticket is created 7 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.

Our next available supporter will start replying to tickets in about 1.49 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+02:00)

This topic contains 2 replies, has 2 voices.

Last updated by John 7 years, 2 months ago.

Assisted by: Juan.

Author
Posts
#484795

I have a Custom Post Type named States. The user selects a State by abbreviation from a drop down list. The State's full name gets stored as the value. For example, AL stores Alabama.
When processing a view that would contain this information, I want to display the custom field content, not the display text.
State's full name, not the abbreviated value.
For example, <h3>State: [types field='farm-state-select'][/types]</h3> gets me the State abbreviation. How do I get the value field?

Thank you.

#485044

Juan
Supporter

Timezone: Europe/Madrid (GMT+02:00)

Hi John

Thanks for the feedback.

As our documentation states, there is an "output" shortcode attribute that you can use to get the raw, database value for a select field:
https://toolset.com/documentation/customizing-sites-using-php/functions/#select

Hope it helps.

Regards.

#485179

Thank you. Some more practical examples might have made that process more obvious.
The button will insert the code [types field='farm-state-select' output='raw'] if one knows the purpose of the raw output. I thought it was just there to avoid HTML formatting.

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