Sauter la navigation

[Résolu] Display checkboxes values as list

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

Marqué : 

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par fabriceS Il y a 4 années et 8 mois.

Auteur
Publications
#1797121

Hi !

I created a postfield "property" for a real estate website.
I created multiple fields as number of bathrooms, number of rooms, etc... which are simple "number" values.
I created also a field with multiple checkboxes. The displayed result is in 1 line like : "value1, value2, value3"

but I'd like to display it as an unordered list.

How can I do that ?

#1797663

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01:00)

You need to set up the markup before and after the field with the ul tags and the first opening li tag and final closing li tag, and then instead of the default comma separator use li tags like so:

<ul>
  <li>[types field='checkers' separator='</li><li>'][/types]</li>
</ul>

If you are using Blocks rather than the legacy interface you would need to add that using a Fields and Text block in HTML mode (and you will need to edit the slug of your field, of course).

#1798153

Thank you so much Nigel !
It works great.

Have a nice day !

Fabrice

#1798155

My issue is resolved now. Thank you!