Skip Navigation

[Resolved] Custom Fields Checkboxes Not Displaying Properly On Front End

This support ticket is created 6 years, 6 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 6 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#923224

I am trying to:

Display the custom fields "Appliances" or "Entertainment" under "Motorhomes" Custom Fields as an unordered list on my front end. I recently switched themes to Divi and am building my template.

Each motorhome I have is tied to the "Single Motorhome" page template built by Divi except the Monaco 43' listed below which is tied to "Single Luxury Motorhome"

It appears to be displaying every single checkbox, even the ones not checked. How can I fix this?

Link to a page where the issue can be seen:

hidden link

Click "Features"

Scroll down to "Entertainment"

See how it's displaying extra

  • Here's my code:
    [code]
    <h4>Appliances</h4>

    • {!{types field='motorhome_appliances' separator='
    • '}!}{!{/types}!}

    <h4>Entertainment:</h4>

    • {!{types field='motorhome_entertainment' separator='
    • '}!}{!{/types}!}

    <h4>Luxury Equipment:</h4>

    • {!{types field='motorhome_optional_equipment' separator='
    • '}!}{!{/types}!}<p></p>

    <h4>Leveling Information:</h4>
    <p>{!{types field='motorhome_jacks_and_leveling_systems' separator=' '}!}{!{/types}!}</p>
    [/code]

    #923399

    I think this is due to this BUG:
    - If you have a Custom Checkboxes Field and display it's content with a separator, the separator is put-out as well for the not-checked options.

    In your case that translates to a whole bunch of HTML being output for empty content.

    For that, we have already a solution:
    https://toolset.com/errata/unchecked-checkboxes-rendered-by-using-types-shortcode/

    Can you let me know if that patch solves the issue you see?