Skip Navigation

[Resolved] Conditional display with multiple options checkboxes

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 1 voice.

Last updated by Eric De Paep 7 years, 3 months ago.

Assisted by: Noman.

Author
Posts
#558941

Hi,

I have a checkboxes post field with multiple checkboxes/values for car features. I want to display a formatted list of available car features for each car. This means that the empty values must not be displayed, otherwise they will create empty rows in the front end. I'm trying to achieve this with conditional output (also tried with wpv-if). I've tried several shortcodes but none of them work. Example:

[wpv-conditional if="( !empty($(wpcf-security)) )"]<div class="features"><i class="fa fa-check"></i>[types field='security' option='0' state='checked']ABS[/types]</div>[/wpv-conditional]

I also read in the forum that conditional output does not work with multiple checkboxes but this thread is from 2012. Is there anything new in this area?

Is there any other way to achieve this?

Thanks.

#558956

Hi,

It's OK. I found an alternative way to display the list.

<div class="features">[types field='security' separator='</div><div class="features">'][/types]</div>

Just had to change the post field option display values in the post field admin to display the requested feature name which is not the same as the value to store in the database.

Thanks anyway.