Skip Navigation

[Resolved] Show field label

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 replies, has 2 voices.

Last updated by Beda 7 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#495608

I am trying to:
show the custom field label as well as the field value.

currently only showing the field value how can i output the field label and value together.

Thanks

#495906

You should be able to display the Label (name) with the ShortCode attribute "show_name=''"

Example:

[types field='checkboxes' separator=', ' show_name='true'][/types]
[types field='file' link='true' show_name='true'][/types]
[types field='phone' show_name='true'][/types

I will request an immediate update of the GUI, so that option is actually also available when inserting the ShortCode
The Attribute is also elaborated here:
https://toolset.com/documentation/customizing-sites-using-php/functions/

#496151

Hi
Thanks for the info and link, that link info is very useful. I have a related further question to fields

I have got the label to show but would need to style the label different to the value - see screenshot
hidden link

Also If a field is not required or entered, using {show_name='true'] attribute will the field still display?
i.e. I would like to only show name if the field has a value is there a parameter that equals 'if present' or something

Thanks

#496225

this is my field output
<h3>[types field='course-bcu-award' show_name='true'][/types]</h3>
how can I target is separately?
thanks

#496265

sorry for the multiple posts but these issues have arose from showing the labels, please see above posts also.
On repeating field values the label duplicates also, i need it to show once with values seperated
see screeenshot: hidden link

thanks

#497060

1. I have got the label to show but would need to style the label different to the value - see screenshot
hidden link

This is not possible.
If you need different Style, then you cannot output the Label with the ShortCode but should add it manually like this:

<class>Label:</class> [shortcode]

2. For this the generic best approach is to use HTML conditional:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

3. On repeating field values the label duplicates also, i need it to show once with values seperated
see screenshot: hidden link

This is expected, I'll ask the developers if we can add a setting for this.

The forum ‘Types Community Support’ is closed to new topics and replies.