Tell us what you are trying to do? I'm trying to loop through checkbox selections (the checkbox is a custom field). I've followed this documentation but it's not displaying anything.
Is there any documentation that you are following?
https://toolset.com/forums/topic/display-images-from-checkbox-values/
https://toolset.com/documentation/legacy-features/views-plugin/checking-fields-and-other-elements-for-emptynon-empty-values/
Here is the code I'm using. on the content template where I'm putting it, it displays the first two options, but nothing is displayed when I view the single custom post type.
[wpv-conditional if="( '[types field='reimbursed-services' option='0'][/types]' eq 'video' )"]
- Virtual visits via video technology
[/wpv-conditional]
[wpv-conditional if="( '[types field='reimbursed-services' option='1'][/types]' eq 'phone' )"]
- Virtual visits via phone
[/wpv-conditional]
[wpv-conditional if="( '[types field='reimbursed-services' option='2'][/types]' eq 'remote-monitoring' )"]
- Remote patient monitoring
[/wpv-conditional]
This was what I had before I looked up the documentation, but it's only working for the first one, "virtual visits via video technology"
<div class="contact list2">The majority of our health centers are currently reimbursed for:<br>
[wpv-conditional if="( $(wpcf-reimbursed-services) ne '' )"][wpv-conditional if=" ( ( $(wpcf-reimbursed-services) eq 'video' ) ) " ]
- Virtual visits via video technology
[/wpv-conditional][wpv-conditional if=" ( ( $(wpcf-reimbursed-services) eq 'phone' ) ) " ]
- Virtual visits via phone
[/wpv-conditional][wpv-conditional if="( ($(wpcf-reimbursed-services) eq 'remote-monitoring' ) ) "]
- Remote patient monitoring
[/wpv-conditional][/wpv-conditional][wpv-conditional if="( $(wpcf-vh-contact) eq '' )"]<li class="no-results">None offered at this time[/wpv-conditional]
</div>
What is the link to your site? hidden link password: health
Hello,
You are using [wpv-conditional] shortcode in the "Fields and Text" block, to avoid the formatting and escaping character issues, I suggest you try to put those shortcodes into WordPress built-in block "Shortcode Block", and test again:
https://wordpress.org/support/article/shortcode-block/
Hi sorry if I wasn't clear. I'm not having formatting issues. The correct output is not being displayed. For example, on the link I shared, hidden link (password: health), if you open the "Virtual Healthcare" tab, the "reimbursements" section should display two bullet items: Virtual visits via video technology and Virtual visits via phone. It is only displaying the first one. I tried to write the shortcode two different ways, as I shared above, but neither of them is working.
You can debug the shortcodes easily, for example, output [types field='reimbursed-services' option='1'][/types] directly, check the result in frontend, then use the result in [wpv-conditional] shortcode, if you need more assistance for it, please provide a test site with the same problem, also point out the problem content template URLs, I need to test and debug it in a live website, thanks
Thanks, I was able to fix this by taking out the eq 'phone' as it wasn't necessary and was causing nothing to display.
My issue is resolved now. Thank you!