Skip Navigation

[Résolu] Conditional display with multiple options checkboxes

This support ticket is created Il y a 7 années et 3 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 1 réponse, a 1 voix.

Dernière mise à jour par Eric De Paep Il y a 7 années et 3 mois.

Assisté par: Noman.

Auteur
Publications
#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.