Skip Navigation

[Resolved] display / hide image or view by using a check box

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

Problem:

Display contents on custom checkbox field, but there is no option to use Toolset conditional block in Elementor.

Solution:

In your case, there are two workaround:

1) You can follow our document to design the contents with Blocks editor:

https://toolset.com/course-lesson/using-toolset-with-elementor-page-builder/#how-to-use-elementor-with-toolset

section "How to use Elementor with Toolset"

2) If you insist on the Elementor editor, you will need to try "Shortcode Widget"

https://elementor.com/help/shortcode-widget/

And setup the [wpv-conditional] shortcode manually:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

Relevant Documentation:

This support ticket is created 3 years, 10 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
- 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 2 replies, has 2 voices.

Last updated by johnh-18 3 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1927591
checkbox.jpg

Tell us what you are trying to do?
Is it somehow possible to use a custom field checkbox to display/not display an image and / or view? I have found a workaround by entering HTML code in the 'Value to show selected box' for the checkbox (see attachment) so when the checkbox is ticked, the HTML code is activated and vice versa but there is probably a better way to do the same thing.
The idea is to incorporate this in an Elementor template and as far as I know, there is no option to use Toolset conditional block in Elementor.

What is the link to your site?
thegreataddress.com

Best regards / john

#1927643

Hello,

No, it is not possible to use shortcodes in option "Value to show", and it won't simply won't work as you expected.

In your case, there are two workaround:
1) You can follow our document to design the contents with Blocks editor:
https://toolset.com/course-lesson/using-toolset-with-elementor-page-builder/#how-to-use-elementor-with-toolset
section "How to use Elementor with Toolset"

2) If you insist on the Elementor editor, you will need to try "Shortcode Widget"
hidden link
And setup the [wpv-conditional] shortcode manually:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

#1927659

My issue is resolved now. Thank you!