Conditional Multiple Pages?

WordPress
6 February, 2020 00:36:25
elvinw
Topics: 1
Messages: 3
Firstly I should state I am not an expert with custom post types in Wordpress. Nevertheless I have created a custom post type with custom fields that input into a one page PDF document using the free plugin. I know I need the pro extension.

I need to be able to conditionally create and fill additional PDF pages as required. The pages will have the same design, and the top 3rd of the page will have the same customer data as the other pages.

The last page then needs to have a space for a customer signature.

So in summary, filled forms might be:

1 page plus page with signature box
2 pages plus page with signature box
3 pages plus page with signature box

So I am thinking that the possible solution would be to upload to the plugin 3-4 blank PDF documents with these number of pages, and then conditionally enter that data in the custom post type? I just don't want multiple PDF documents being provided/downloaded.


Also a side-note, with the yearly subscription, I presume that is required for the plugin to work at all? Or is it more for support?

Thanks
7 February, 2020 02:34:31
Oleksandr
Support
Topics: 4
Messages: 1087
Hi,

Can you please clarify some information:

Is it correct that you have some custom post type with some custom fields there? Depending on this filled fields it must generate the link to 1 page PDF, 2 pages PDF, 3 pages PDF? Or you will need to generate different PDFs from backend with same data?

E2Pdf actually has "Actions" and "Conditions", which allow hide pages depending on some empty values, so, in theory, if you need to generate different page PDFs depending on data inside custom fields, it can be enough just 1 Template, with actions to hide 2nd/3rd page with content but not the last page that can contains "Signature".

If possible, you can try to attach more screenshots with example data what you have and what you need to get so we can more clearly understand the task and the possibility to complete it with E2Pdf. Thanks.

P.S. It's possible also to use "Actions" and "Conditions" on fields/html objects, so you can test it with free license key, to see if this solution will work for you with 1 page, just creating "html" object as each page, and hide them when needed.

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
7 February, 2020 02:41:06
Oleksandr
Support
Topics: 4
Messages: 1087
As about License Key, yes, it will be need to renew License Key each year to keep plugin working at this moment.

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
12 February, 2020 01:40:11
elvinw
Topics: 1
Messages: 3
1. Yes custom post type with custom fields
2. There is only one PDF, however the PDF may have 1, 2, or 3 pages depending on how much text is entered or what fields are entered.

Thanks for your answers. Are you suggesting a HTML form outside of WordPress?
13 February, 2020 04:30:50
Oleksandr
Support
Topics: 4
Messages: 1087
Hi,

You must follow such logic: by default all pages "Visible", so in most cases "Show" action not required, just "Hide" action.

As I Understand you have 4 pages inside E2Pdf Template. So action for pages which must do the job:

For 1st page: - Contains Header + Textarea + Signature
Action: "Hide"
Apply: "If Any"
Condition1: [pages_required] = 2
Condition2: [pages_required] = 3

For 2nd page: - Contains Header + HTML first block
Action: "Hide"
Apply: "If Any"
Condition1: [pages_required] = 1

For 3rd page: - Contains only HTML block with "parent" set to HTML first block
Action: "Hide"
Apply: "If Any"
Condition1: [pages_required] = 1
Condition2: [pages_required] = 2

For 4th page: - Contains HTML block with "parent" set to HTML first block + Signature
Action: "Hide"
Apply: "If Any"
Condition1: [pages_required] = 1

Try to use such conditions, if it will not work, attach please screenshots of output with each option 1,2,3 pages required. Thank you.

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!