Skip Navigation

[Resolved] Display checkboxes as unordered list

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display a checkboxes field as an unordered list instead?

Solution:
By getting creative with the separator attribute you can output the checkboxes according to your needs. To output as an unordered list try the following:

<ul>
  <li>[types field='choices' separator='</li><li>'][/types]</li>
</ul>
This support ticket is created 6 years, 11 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 6 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#609603

I want my custom field checkboxes to display as an unordered list.

This should be as simple as checking an option to display it that way vs just in paragraph form separated by a comma. It looks terrible.

Please add this option to custom fields. Just another example of how this plugin needs improvement.

Thanks

#609705

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Derrick

You can do this already.

When you insert the checkboxes custom field using the Fields and Views button, replace the comma for the separator with closing and opening li tags, and add markup around the shortcode to generate a ul, so that the inserted shortcode looks like so:

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

The checkboxes will then appear as an unordered list for you to style as required.

#609999

Ok got the list to work. Thanks. However, this should be offered as a checkbox in the options screen upon inserting the custom field shortcode. Much easier.

Next, there is now an error displaying under the unordered list now.

Content Template debug:

Calling functions are call_user_func

Page link - hidden link

I can't believe how difficult it has been to build a super simple custom post type. I have 20+ hours in this! That is $2000 in time. I've lost my butt on this project. I think at least a free license is in order. This has been crazy.

#610058

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Derrick

I'm sorry you are having trouble getting things working.

You can write to our support manager Amit Kvint if you have a particular complaint about the service or product: amit.k@onthegosystems.com

For the error you are describing I'm afraid you'll need to open a separate ticket about it, support policy is one issue per thread (https://toolset.com/toolset-support-policy/).

You are welcome to assign it to me and I will investigate.