Apply Multiple shortcode condition

April 25, 2023 02:56:56
cvla
Topics: 7
Messages: 23
Hi,

Is it possible to add multiple conditions (AND , OR) in the same conditional shortcode.
https://docs.gravityforms.com/conditional-shortcode/
April 25, 2023 03:13:50
E2Pdf
Topics: 7
Messages: 3614
Support
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!
April 25, 2023 22:57:32
cvla
Topics: 7
Messages: 23
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
April 26, 2023 01:02:10
E2Pdf
Topics: 7
Messages: 3614
Support
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!
April 27, 2023 02:21:26
E2Pdf
Topics: 7
Messages: 3614
Support
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!
April 27, 2023 03:07:25
cvla
Topics: 7
Messages: 23
It worked! Thankyou.
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.