[Resolved] Display check-mark in the front end for the checked custom fields

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.

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 3 months, 2 weeks ago.

Assigned support staff: Minesh.


I'm building a real estate property website and currently working on the single property page and would like to have something similar to the attached image.

Can you let me know how can we create something similar to the image I've uploaded?

I think I will have checkbox custom field create for these real estate amenities but do not know the way forward for how to show them in the front end. More specifically, could we show them in grey colour if the property doesn't have the amenity associated with it?




Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There are two ways you can display the conditional content using checkboxes:

- using [wpv-conditional] shortcode

[wpv-conditional if="( '[types field="field-name" option="0"][/types]'  eq 'replace_value' )"]
   content to display 
[wpv-conditional if="( '[types field="field-name" option="1"][/types]' eq 'replace_value' )"]
     content to display 

More info:
=> https://toolset.com/documentation/user-guides/views/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/#checking-types-checkboxes-field-for-non-empty-value

- using the Types shortcode for checkboxes with state attribute:

[types field="field-name" option="0" state="checked"]
text to display when option 0 is checked 

[types field="field-name" option="0" state="unchecked"]
text to display when option 0 is unchecked 
[types field="field-name" option="1" state="checked"]
text to display when option 1 is checked 

More info:
=> https://toolset.com/documentation/customizing-sites-using-php/functions/#checkboxes