Apply Multiple shortcode condition

25 April, 2023 02:56:56
cvla
Topics: 6
Messages: 22
Hi,

Is it possible to add multiple conditions (AND , OR) in the same conditional shortcode.
https://docs.gravityforms.com/conditional-shortcode/
25 April, 2023 03:13:50
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Unfortunately, no. As we know, Gravity Forms conditional shortcodes don't support AND, OR conditionals logic.
We would really appreciate your feedback at WordPress.org!
25 April, 2023 22:57:32
cvla
Topics: 6
Messages: 22
Hi,

Is there a way to check Gravity Form question with checkboxes and we need to show the conditional shortcode based on one of the checkbox's value
Any help appreciated
26 April, 2023 01:02:10
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

After some additional review, it looks like Gravity Forms has undocumented nested shortcode support. We just checked and it seems to be working as expected inside PDF:

https://codeshare.io/8p3X6B

* Keep attention please that "outer shortcode uses "gravityforms" and inner shortcodes must use "gravityform". Will it fit your needs?

If still not, it's possible to use E2Pdf Conditional Logic, to put dynamic value to the "Value" as on the attached screenshot.

** In both cases, "Checkbox 3" - must be replaced with the value rendered via comma if you use {Checkbox:5} inside temporary "textarea".
We would really appreciate your feedback at WordPress.org!
27 April, 2023 02:21:26
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Unfortunately, it looks like the only way is to use E2Pdf conditional logic on the field to change field value dynamically as it supports multiple conditions, or if you need to print it inside merged "HTML", you can extend functionality with a PHP code that must be added to your theme functions.php or as PHP Snippet:

https://codeshare.io/JbXPqq

After the code is added, you must be able to use the shortcode as:

[gravityforms action="conditional" merge_tag="{Untitled:1}" condition="contains" value="Pink||Red"]
Pink or Red
[/gravityforms]
We would really appreciate your feedback at WordPress.org!
27 April, 2023 03:07:25
cvla
Topics: 6
Messages: 22
It worked! Thankyou.