Is there a shortcode that displays just the name of a field (and not the value)
I want to display some information from CRED fields on a post, but would like the names to be pulled from the database and not hardcoded (so that they update when a mod changes a field name)
Similarly, I'd like to display the descriptions of a field - is there a shortcode for that?
Thanks!
The layout is similar to this:
<li itemprop="amenityFeature" itemscope itemtype="<em><u>hidden link</u></em>">
<span itemprop="name">Induction Loop Available</span>:
<span itemprop="value">[types field='accessibility-induction-loop-available' state="checked"]Yes[/types][types field='accessibility-induction-loop-available' state="unchecked"]No[/types]</span>
</li>
I'd like "Induction Loop Available" to come from the CRED field and not hardcode it
Hi, the description is meant to be shown in wp-admin but not intended for use in CRED.
If you'd like to include a message next to a CRED form field, you need to create another shortcode for it, for example this thread:
https://toolset.com/forums/topic/get-custom-field-description-in-php/
Thanks, I thought that might be the case with descriptions.
Is there a way to show just the field name though?
same as above, you can get the field name setting like this:
$fields=get_option( "wpcf-fields" );
$name=$fields['my-single-line-field-slug']['name'];