Save PDF to Server and Redirect User

Formidable Forms
October 11, 2021 07:16:03
yoni
Topics: 1
Messages: 1
I am creating a form where my customer fills out their information.
They then hit submit and the completed form is saved on my server with a filename that is based on a value in their form.
I use "[e2pdf-save id="2" flatten="1" dataset=[id] name=[17] dir="wp-content/uploads/submitted/"]" in the On Submit Message Box.
Until now works very well.


My customer then needs to go to a payment page.
Once they complete the payment, an email will go to the admin with the completed form as the form is what is needed for processing their order.
(Yes, I could work with PayPal/Stripe in conjunction with Formidable, unfortunately, due to the nature and location of our business, neither PayPal nor Stripe are an option)
(So I plan on using WooCommerce with another CC option that will be determined going forward)

1) Filename, can I add today's date to the filename?
2) I would like to forward my user to another page after they submit the form, but once I change my "On Submit" to "Redirect To Url" then my file no longer saves to the server.

I believe that once the file is saved on the server and I know the filename, I will manage the rest of the process without your plugin and Formidable's help, but I am stuck on this.
If you have another way to suggest I go about this, I am all ears.

Thank you
October 11, 2021 08:25:02
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

1. You can try to use Formidable Forms [created-at format='d-m-Y'] in "name" attribute to add entry created date for file name:

[e2pdf-save id="2" flatten="1" name="[created-at format='d-m-Y']_[17]" dir="wp-content/uploads/submitted/"]

* dataset="[id]" attribute can be truncated as it will be added automatically when used inside "Success Message" or "Mail Body", and it's required only if it's used inside "View".

2. You must be able just to put your shortcode inside Formidable Forms "Mail Body" action instead of "Success Message" so when mail action will fire it will save PDF on the server.

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.