How to use E2PDF actions to hide HTML input

Forminator Forms
30 June, 2021 20:28:27
crduling
Topics: 1
Messages: 2
I have an HTML input in my E2PDF template that I want to hide based on whether a Forminator text input has any value. This Forminator text input is blank by default, but if the user selects a certain checkbox, I use jQuery to change the value of the text input to the message I need. In E2PDF, I need to show a message ONLY if the Forminator text input is not empty (meaning the checkbox was clicked).

So, I'm wondering if this is where the E2PDF "actions" section comes in. Am I able to use the "actions" section to hide the E2PDF HTML input based on the value of a Forminator text input? If so, how would I format that? Given the Forminator text input is {text-17}, would the action be formatted like so?

Order: 0 Action: Hide
If: {text-17} Condition: != Value: "IV mild sedation"

I read something about using shortcodes for the "if" and "value" sections, so I wasn't sure I would be able to do it the way explained above (unless {text-17} is a shortcode). Let me know if you have any questions. Thank you!
1 July, 2021 06:29:36
E2Pdf
Support
Topics: 7
Messages: 3345
Hi,

Yes, {text-17} can be used inside "Actions" and "Conditions". It renders values exactly the same as inside E2Pdf Template, you can create simple "textarea" inside E2Pdf Template and map it with {text-17} - you will get the value to which this shortcode rendered. It's need just to keep in mind that all elements visible by default to have correct logic.

Here is some alternative ways examples:

screenshot 1:
Your way, it will hide element if {text-17} is not equal to IV mild sedation. For example if {text-17} is empty - then it will be shown also.

screenshot 2:
It will "hide" element by default and will show it when {text-17} is not empty.

screenshot 3:
It will "hide" element by default and will show it if needed checkbox ticked by checking if "{checkbox-1}" contains "option" inside string via "LIKE". For example if user tick 2 checkbox - {checkbox-1} will be rendered as Option 1, Option 2 or Option 1, Option 3. So element will be shown only if {checkbox-1} will have "Option 2".

We remain at your service.
We would really appreciate your feedback at WordPress.org!
3 July, 2021 07:21:09
crduling
Topics: 1
Messages: 2
Worked like a charm! Thank you so much!