Form update and PDF saved & updated

August 30, 2018 22:19:29
Carophil
Topics: 3
Messages: 7
I have a form already filled and I change a field value. I click on update but the pdf isn't saved in tpl/"templateID"/save.
Could you help me?

Many Thanks

Philippe
August 30, 2018 23:22:19
E2Pdf
Topics: 7
Messages: 3614
Support
Hi,

Sorry, what do you mean by changing a field value? And "Update"?

PDFs are generating on the fly. You can export pdf from E2Pdf Export page and download it.

Are you using shortcode [e2pdf-save] shortcode with success message?

If it's possible can you please clarify which task are you trying to complete so we can advice you a solution?

We remain at your service.

We would really appreciate your feedback at WordPress.org!
August 31, 2018 10:49:01
Carophil
Topics: 3
Messages: 7
Oh sorry I'll try to be more specific.
1 - I have build a Form with Formidable Forms. This form can be modified.
2 - I have build a pdf based on the forms above
3 - When I change a value in the form and I update the form (the data in the form) the pdf is not created and if it exist, it is not updated with the new data.

PS: I have put the "Save" shortcode in sucess and update messages.

Many thanks for your help
Philippe
August 31, 2018 12:13:20
E2Pdf
Topics: 7
Messages: 3614
Support
Thank you. Now it's a bit more clear.

Just to confirm: Are you editing entry from Admin Dashboard? Or from Frontend?

If from Admin Dashboard - "Success Message" and "Update Message" not firing by Formidable in this case.

You can use custom code in your functions.php to have applied [e2pdf-save] shortcode on "frontend" and "backend" edit:

add_action('frm_after_update_entry', 'after_entry_updated_e2pdf', 10, 3);
function after_entry_updated_e2pdf($entry_id, $form_id) {
if ($form_id == '3') {
do_shortcode('[e2pdf-save id="14" dataset="' . $entry_id . '" apply="true"]');
}
}

Where:
14 - E2Pdf Template ID
3 - Formidable Form ID

This action will fire on any update (Backend and Frontend).

Let us know if there is some misunderstanding. Thank you.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
August 31, 2018 13:51:19
Carophil
Topics: 3
Messages: 7
Hello Oleksandr,

Many thanks. It works perfectly.

I would like to add the name parameter. In may form, the name parameter is name="[173]-[174]-[id]".
Could you help me?

Many thanks

Philippe
August 31, 2018 13:56:01
E2Pdf
Topics: 7
Messages: 3614
Support
Glad to hear that it worked.

You can add any parameter that is available for [e2pdf-save] shortcode the same way:

Updated code with "name" attribute which must work:

add_action('frm_after_update_entry', 'after_entry_updated_e2pdf', 10, 3);
function after_entry_updated_e2pdf($entry_id, $form_id) {
if ($form_id == '3') {
$entry = FrmEntry::getOne($entry_id);
if ($entry) {
$v1 = FrmEntryMeta::get_meta_value($entry, '173');
$v2 = FrmEntryMeta::get_meta_value($entry, '174');
$v3 = $entry_id;
$name = $v1 . "-" . $v2 . "-" . $v3;
do_shortcode('[e2pdf-save id="14" dataset="' . $entry_id . '" name="' . $name . '" apply="true" filter="true"]');
}
}
}

We remain at your service.

We would really appreciate your feedback at WordPress.org!
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.