I am trying to make part of a post edit form only appear if an audio file field has an audio file in it.
I have used the following code:
[cred_show_group if="( $(wpcf-audio-13602434) eq '' )" mode="fade-slide"]
<div class="cred-field cred-field-date-of-broadcast">
<label class="cred-label">
Date and EXACT time of Broadcast <h6>(there is no longer a need to convert from BST, just use whatever is "normal" time!)</h6>
</label>
[cred_field field='date-of-broadcast' post='audio-file' value='' urlparam='']
</div>
[/cred_show_group]
[cred_show_group if="( $(wpcf-audio-13602434) ne '' )" mode="fade-slide"]
<div class="cred-field cred-field-date-of-broadcast">
<label class="cred-label">
Date and approximate time of Broadcast <h6>(there is no longer a need to convert from BST, just use whatever is "normal" time!)</h6>
</label>
[cred_field field='date-of-broadcast' post='audio-file' value='' urlparam='']
</div>
<label class="cred-label">
Add your audio file
</label>
[cred_field field='audio-13602434' force_type='field' output='bootstrap']
<label class="cred-label">
Myriad Cart Number
</label> if this audio is also in Myriad please provide the cart number
[cred_field field='cart-number' force_type='field' class='form-control' output='bootstrap']
[/cred_show_group]
Neither of the pieces of content in the two cred_show_group s appears.
Thanks
Hello and thank you for contacting the Toolset support.
Your code seems correct, and it should work. To better assist with this issue, I'll need to access your website to check this further.
*** Please make a FULL BACKUP of your database and website.***
Your next reply will be private to share credentials safely.
You may also want to check if setting the condition on the post type definition will work for your form.
https://toolset.com/documentation/user-guides/front-end-forms/conditional-display-for-form-inputs/
Please give more details about the form and where it is used.