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