Skip Navigation

[Resolved] Displaying checkboxes output, not text but icon image

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

Problem:

Displaying custom checkboxes field output, not texts but icon images

Solution:

It is possible within Types shortcode, for example:

[types field="color" option="0" state="checked"]Here display icon for Red[/types]
[types field="color" option="1" state="checked"]Here display icon for Blue[/types]
[types field="color" option="2" state="checked"]Here display icon for Yellow[/types]

More help:

https://toolset.com/documentation/customizing-sites-using-php/functions/#checkboxes

Attribute: "option"

"zero-based index number"

e.g. option=”0″ Will output the value for the option number specified. For checkboxes, will display the checked valued of the nth checkbox in the group.

Relevant Documentation:

https://toolset.com/documentation/customizing-sites-using-php/functions/#checkboxes

This support ticket is created 6 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 7 replies, has 2 voices.

Last updated by rolandP 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#627019

Tell us what you are trying to do? Displaying checkboxes output, not text but icon image

Is there any documentation that you are following? No

Is there a similar example that we can see?

Hi,

I made custom field for Woocommerce.
Color: Red, Blue, Yellow
hidden link

In product page I selected what I want to show up on front page:
hidden link
This is okay.

I build product page with addons: hidden link for Visual Composer. I use shortcode to view field from Toolset what I made
hidden link

My question is how replace text with icon image?
More info: hidden link

many thanks

#627177

Hello,

It is possible within Types shortcode, for example:

[types field="color" option="0" state="checked"]Here display icon for Red[/types]
[types field="color" option="1" state="checked"]Here display icon for Blue[/types]
[types field="color" option="2" state="checked"]Here display icon for Yellow[/types]

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#checkboxes
Attribute: "option"
"zero-based index number"
e.g. option=”0″ Will output the value for the option number specified. For checkboxes, will display the checked valued of the nth checkbox in the group.

#627346

Hi,

1. Back-end setup: hidden link
2. Add shortocode:
hidden link
3. I check in product page Red and Blue: hidden link
4. Show me: Red, Blue and Yellow: hidden link

Where I made mistake?

Do you want access to my website?

many thanks

#627598

I have tested those codes in my localhost, it works fine, please check these in your website:
1) You are using the latest version of Types plugin 2.2.22, you can download it here:
https://toolset.com/account/downloads/

2) deactivate other plugins and switch to wordpress default theme, and test again

3) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL, I need to test and debug it in my localhost, thanks

#627673

Thanks for the details, since you have provided credentials of your website, so I have tested it directly in your website:
1) Createa product post "test product":
hidden link
With same codes in the post content:

Color:

[types field="color" option="0" state="checked"]Here display icon for Red[/types]
[types field="color" option="1" state="checked"]Here display icon for Blue[/types]
[types field="color" option="2" state="checked"]Here display icon for Yellow[/types]

Test it in front-end. I can see it works fine
hidden link

Can you confirm it, so it is a compatibility problem in your website, please try as I mentioned above:
deactivate other plugins and switch to wordpress default theme, and test again

Try to locate the problem plugin/theme in your website.

#627801

Hi,

Problem is with Product Template Addons. I write to author.
Don`t close ticket i will update when get answer.

many thanks

#628140

OK, please update this thread when you need more assistance, thanks

#628191

Hi,

Topic to close.

many thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.