hide download button

Gravity Forms
7 December, 2020 10:41:48
Clever-2021-bafoeg
Topics: 7
Messages: 27
Hello,
I have a problem similar to this post https://e2pdf.com/support/desk/conditionally-create-pdf.
I work with gravity forms and have the following problem. I linked a form with two templates. However, if the customer fills out the form and the second template does not apply to him, I want the customer not to see the second template as a download/view either. How is that possible?
7 December, 2020 23:39:02
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

You must be able to use Gravity Forms Conditional Shortcode: https://docs.gravityforms.com/conditional-shortcode/

Example attached as screenshots below.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
8 December, 2020 07:38:56
Clever-2021-bafoeg
Topics: 7
Messages: 27
OK thank you. great service from you. the tool is very good !!

I have another important question. I have a question in a form in which the customer is asked how many children he has. a template must be filled out for each child that he specifies. Is it possible to automate this function. Because the number of children is undefined. It could be 3 children, but it could also be 1 or 6.

Thank you very much
8 December, 2020 08:48:04
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Can you please clarify:

- Do you show additional fields based on number of children value in the form?

The goal can be to use multiple templates mapped to different data on same data entry. Along with Gravity Forms Conditional Shortcode you must be able to generate different download links, where 1st template will contain data for 1 child, 2nd template will contain data for 2nd child, and so on.

However to understand the task correctly it would be good if you will share URL to the form which must be filled. You can mark message "private" so only we can see the message if you will decide to share the URL to the form.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
8 December, 2020 09:20:06
Clever-2021-bafoeg
Topics: 7
Messages: 27

Thank you for the fast answer.

So in the form I have the question "How many children do you have?" the customer can then enter the number. So it becomes a number field (unlimited). For each child that the customer specifies, he must enter information in the form. This is the same template, but with different defined fields (for each child).

Example: The customer types in that he has two children. He fills out the information about the children. Is it then possible, depending on how many children he has, which templates are shown at the end.

So that means that the customer can also register unlimited children and the templates are shown at the end.
8 December, 2020 10:53:54
E2Pdf
Support
Topics: 7
Messages: 3163
It seems you need something like:

https://gravitywiz.com/documentation/gravity-forms-nested-forms/

The usage inside PDF and inside Gravity Forms conditions will be like this:

{Nested Form:5:filter[1],index[0]}
It will output value from Field ID 1 of nested form under Field ID 5 with 0 index.

For 2nd entry it will be:
{Nested Form:5:filter[1],index[0]}

and so on.

Here is some screenshots attached of the setup.

1. Created nested form
2. Parent form with added nested form under Field ID 5
3. Condition to generate multiple PDF files by checking if nested entry with index and value exists (in this case it will check if name filled)
4. Mapped PDF under ID 65 for 1st child
5. Mapped PDF under ID 72 for 2nd child

However if you already setup the form to added multiple children fields with different Field IDs, you must follow the same way: check if some field name not empty and depending on it generate "view" shortcode with needed Template ID which mapped to these fields.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
9 December, 2020 05:54:05
Clever-2021-bafoeg
Topics: 7
Messages: 27

I understand. However, my problem is that I have to define a pdf template for each child now. Isn't it possible that I define only one pdf child-template and it its valid for several children ? I need the solution for e2pdf?

For example: I have one pdf Template defined in e2pdf which can be used 1-10 times with different input(for each children).

9 December, 2020 06:20:18
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

We were thinking on the way to complete the task and it seems must be possible to use with 1 template as below, however it will be still need to use GravityWiz Nested Form, screenshots and description attached:

1. Created nested form
2. Parent form with added nested form under Field ID 5
3. Condition to generate multiple PDF files by checking if nested entry with index and value exists (in this case it will check if name filled). Here also will be the first difference as we will add "arg1" attribute with different index to detect which value must be pushed to PDF.

[gravityforms action="conditional" merge_tag="{Children:5:filter[1],index[0]}" condition="isnot" value=""]
1st child
[e2pdf-view id="65" arg1="0"]
[/gravityforms]

[gravityforms action="conditional" merge_tag="{Children:5:filter[1],index[1]}" condition="isnot" value=""]
2nd child
[e2pdf-view id="65" arg1="1"]
[/gravityforms]

and so on...

We are changing {Children:5:filter[1],index[---->index parameter<-------]}
And [e2pdf-view id="65" arg1="---->index parameter<-------"]

4. Inside E2Pdf Template we will use "Action" and "Conditions" on fields which must have different value for different children by detecting arg1 argument and changing the value to value with needed index. To access actions and conditions "Right Mouse Click" on field -> "Properties" -> "Add Action".

Actions will look like this:

-------------------------------
1st action (For 1st child):

Action: "Change"
Property: "Value"
Change: {Children:5:filter[1],index[0]}
If: [e2pdf-arg key="arg1"]
Condition: =
Value: 0
-------------------------------

-------------------------------
2nd action (For 2nd child):

Action: "Change"
Property: "Value"
Change: {Children:5:filter[1],index[1]}
If: [e2pdf-arg key="arg1"]
Condition: =
Value: 1
-------------------------------

and so on...

Here changed {Children:5:filter[1],index[---->index parameter<-------]}
And "Value" under condition to compare with ---->index parameter<-------

We just checked it on our side and it seems can be working solution.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
9 December, 2020 10:58:26
E2Pdf
Support
Topics: 7
Messages: 3163
It seems you incorrectly connected E2Pdf Template, it must be connected to parent form "test".

You can change form connection via "Options" while E2Pdf Template Edit. Try please to change and check if it will start show PDF.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
9 December, 2020 14:41:57
Clever-2021-bafoeg
Topics: 7
Messages: 27

No, it does not work. I have the error message: warning invalid argument. So There is a problem with the argument..
9 December, 2020 21:53:12
E2Pdf
Support
Topics: 7
Messages: 3163
Hi.

Do you see now PDFs on result screen however it's showing error instead of PDF? If so, then it seems can be something with "Actions" set.

If it's acceptable for you, you can submit support ticket with access details to WP Admin Dashboard here: https://e2pdf.com/support/request so we can login and investigate.

If not:
1. Do you use latest version of "GP Nested Forms" (1.0-beta-8.76)?

2. Check if {Children:1:filter[1],index[0]} and {Children:1:filter[1],index[1]} renders correct values on "Success Message" directly.

3. Try to remove all actions on field and check if PDF will be shown without any data filled, after it try to re-add "Action" and see if error will appear. If error will appear, copy please here values that is set under action.

We remain at your service.


We would really appreciate your feedback at WordPress.org!
10 December, 2020 02:45:10
Clever-2021-bafoeg
Topics: 7
Messages: 27

I tested it again, unfortunately without success. A blank white page is displayed to me. No pdf.
Does the value area have to remain empty?
10 December, 2020 05:09:28
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

1. "Value" must remain empty as it will be replaced in case condition fired so it useless to have it filled.

2. The issue that shortcodes with "filter" and "index" modifiers was not working was that it also depends on "All fields template" https://gravitywiz.com/gravity-forms-all-fields-template/. Sorry, we forgot to mention this. Installation of this addon solved the issue.

3. PHP Warning that you see on your website connected to "GP Nested Form" plugin however we currently reported issue to their team and hope they will include fix on next update. Meanwhile it was applied hot-fix to your current plugin version which fixed it.

P.S. More detailed response sent as answer to your "Support Ticket".

We remain at your service.
We would really appreciate your feedback at WordPress.org!
17 December, 2020 03:20:40
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

It seems you are using "Number" field with "Currency" format along with PDF input field. In this case "input" field inside PDF outputs data same way as it saved by Gravity Forms.

There are 2 possible solutions:

1. Replace "input" fields inside PDF with "html" object (screenshot 1).

OR

2. Wrap Gravity Forms shortcode with [e2pdf-format-output] with "html_entite_decode" filter as value as follows (screenshot 2):

[e2pdf-format-output filter="html_entity_decode"]{Number:4}[/e2pdf-format-output]

We remain at your service.
We would really appreciate your feedback at WordPress.org!
17 December, 2020 09:04:44
E2Pdf
Support
Topics: 7
Messages: 3163
Here is some exaplnation how "Radio" and "Checkbox" PDF fields working with E2Pdf.

FOR PDF RADIO BUTTON

"Radio" has 3 needed values to setup
1. Group
2. Option
3. Value

"Group" name must be unique among same group of "radio" buttons. For example if you have in Gravity Forms Radio Field with values Ja / Nein, you must set exactly for this 2 radio buttons same group name. It can be for example "group1". If you have another field with Ja / Nein answers, for other 2 radios you must use other group name, for example it can be "group2"

"Radio" button will be checked if "Option" will match the "Value". So in your case you must set manually "Option" depending how it's rendered and use same "Actions" and "Conditions" as on other fields by just changing the filter[--->child form field id<--] and "index". By default "Value" also can be blank.

Screenshot 1, weset group name to "group1", Option to "Ja" and "Value" will be changed depending on "argument".
Screenshot 2, we set group name to "group1", Option to "Nein" and "Value" will be changed depending on "argument".

FOR PDF CHECKBOX BUTTON

1. Option
2. Value

It's working almost the same way as "Radio" buttons, however "Checkbox" value doesn't have "group" option. It will be checked if "Value" will contain string from "Option".

So "Actions" and "Conditions" will be the same as on other fields by just changing the filter[--->child form field id<--] and "index". By default "Value" also can be blank.

Screenshot 3 - Setup for checkbox which must be checked if "First Choice" choosed
Screenshot 4 - Setup for checkbox which must be checked if "Second Choice" choosed

To get the correct values to put in "Option" you can just create some "textarea" inside PDF and put there "Values" which will be rendered with needed "filter" and "index" modifications. (screenshot 5, 6, 7).

P.S. On the screenshot you attached you are using "radio" inside Gravity Forms and "checkbox" inside PDF, however it must not be issues to use also in this way if PDF will not remain editable. As example for First checkbox it will be "Option" - "Ja", for 2nd checkbox it will be "Option" - "Nein". "Actions" will be same way as for other fields with changed "filter" and "index" numbers.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
23 December, 2020 20:59:46
E2Pdf
Support
Topics: 7
Messages: 3163
We are working on adding "Nested Forms" to "Visual Mapper" however "Actions" and "Conditions" still will be need to add manually.

You can try to map and add "Actions" and "Conditions" to 1 checkbox/1 radio from the group and after this just copy it via "Right Mouse Click" -> "Copy" and "Paste" back, it will save all "Actions" and "Conditions". It will be need just to change the "Option" value at copied element, it must speed up and make it a bit easier.

P.S. You can try automate however we do not see that it will be easier and faster.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
28 December, 2020 06:45:59
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Update currently expected to be released in 1st quorter of 2021. Unfortunately we can't be more specific on ETA. As soon as we release its support we will update this thread.

We remain at your service.
We would really appreciate your feedback at WordPress.org!