Option to Delay Processing

Formidable Forms
23 September, 2020 08:09:02
jstraete
Topics: 33
Messages: 110
We run into an issue where we submit a Formidable Form and the following page that loads after submitting the form will either take forever to do so or timeout and fail all together. Part of this is due to it being a big form, but also because it submits a few emails upon submission with e2PDF attachments which I know also take some time to submit.

I notice when we submit the form, one of the emails will come through after about 30 seconds, and then another one about 30 seconds later, and so on. It would be ideal if the submission page would load first, and then the e2PDF forms to process last. This may be something I would have to take up with Formidable Forms and I will explore that also, but if there is anything that could be done on the e2PDF side, that'd be helpful.
23 September, 2020 09:38:46
E2Pdf
Support
Topics: 7
Messages: 2259
We know about this problem and unfortunately can't yet offer working solution as it's the problem of PHP. It process functions one by one and will render fully page only when all functions will fire, so in theory mails actions from Formidable Forms must be fired via cron in separate script to avoid this...

Formidable Forms executes sending mails on form submission, so when they executed -> E2Pdf parses mail message -> generates PDFs if needed -> Attaches it to mail -> Mail server send mail and only after this PHP will go on to other functions and will render final page/response.

It looks like the only way to avoid form locking is prepare some script which will run via cron in background and will fire Formidable Forms hooks to send emails. It can be done for example via some hidden field inside form. Cron script will get entries for needed form which has default value in this hidden field like '0', on start of process this hidden field can be updated to '1', script will rise email action for this entry, and will update hidden field to '2' after mail sent.

However as soon as we will have some free time we will try to take a look closer on this problem and maybe will prepare some custom solution/plugin to solve it.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
23 September, 2020 13:52:29
jstraete
Topics: 33
Messages: 110
Ok thank you for the follow up. It would certainly be a great feature to have one day either through e2PDF or Formidable Forms.
6 May, 2021 12:10:27
jstraete
Topics: 33
Messages: 110
Hey Oleksandr,

I'm just following up here on this to see if there is any kind of timeline you could give me on this? If not, I am going to reach out to a developer I think about trying to setup what I need here. I just thought before going the custom solution route, I would check with you to see if there are any updates here first.

Thanks,

Jesse
6 May, 2021 21:13:18
E2Pdf
Support
Topics: 7
Messages: 2259
Hi,

Unfortunately we do not yet have built-in global solution for current issue. We still have it on our TODO list however we can't give you any ETA at this moment. Sorry for inconvenience.

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