Dynamic Shortcodes Download Links and PDFs as attachments

13 June, 2018 03:58:44
barb
Topics: 6
Messages: 18
Hi Guys, I *think* one of the things you were going to be looking at in your updated plugin was the ability to dynamically select which PDF document will get sent in an email attachment. Is that in place? With FPRO2PDF, I have multiple, identical field maps layouts, each with a different PDF associated - Then an email action for each of those layouts. The email/pdf attachment that gets sent out is based on conditional logic from form data - This is all so that if a page is empty/not filled, then I send the PDF that doesn't include that page.

Was this something you were able to do? OR, if not and multiple identical maps (templates?) are required, can the attachment shortcode that goes in the email action be dynamic instead? Then we cold just have one email action, but choose which pdf/layout to use.

Same question for Download links -- I use similar to below now, but not sure how to translate to the new Download shortcode:

[formidable-download form="f5tyy74" dataset=[id] layout=[if 8187 equals="1"]"68"[/if 8187][if 8187 equals="2"]"69"[/if 8187]

Thanks!
B
13 June, 2018 06:35:39
E2Pdf
Support
Topics: 7
Messages: 3331
Hi.

Unfortunately, at this moment, E2Pdf doesn't allow changing PDF on the fly so actually for your needs you will need to create different templates for different conditionals. In future we plan to add some conditional logic that will allow to include/exclude pages and elements inside Templates, that can fit your needs.

E2Pdf download shortcode will looks like: [e2pdf-download id=[if 8187 equals="1"]"68"[/if 8187][if 8187 equals="2"]"69"[/if 8187] - where id - the ID of Template.

E2Pdf attachment shortcode will looks like: [e2pdf-attachment id=[if 8187 equals="1"]"68"[/if 8187][if 8187 equals="2"]"69"[/if 8187] - where id - the ID of Template.

Dynamic [e2pdf-attachment] shortcode available from version: 0.01.53, so check please that plugin was updated before using it.

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