Forums

email and pdf attachment not always working

sharonbetts 30 Sep, 2014
I have a long application (multipage 4 pages). I had tested it extensively and it worked well. Today my client got a submission with only the final data. I have attached the pdf file.

I completed another form and it worked. What could have caused this? Now, they are worried that random submissions will be incomplete. Most of the fields were required, also.

Sharon
GreyHead 30 Sep, 2014
Hi Sharon,

Hard to tell why that would happen. The simplest explanation would be that someone found the URL for the last page somewhere and followed that. The simplest solution is probably to add server-side validation to make sure that the previous pages have been completed.

I also recommend that with multi-page forms you save the data to a database table at the end of each page to provide an audit trail if it is needed.

Bob
sharonbetts 30 Sep, 2014
Thank you Bob,
I will do some research on how to setup server side validation. As for writing to the database after each page. Do I simply add a Write to DB under the Render HTML action?

I have a WRite to DB action at the OnSubmit of the final page now.
Thank you!
GreyHead 01 Oct, 2014
Hi Sharon,

To save a multi-page form you need two things, A DB Save on each action the form is submitted to. And, on the first one after the DB Save you need to get the new record ID and add that to the later pages as a hidden input so that the same record is updated as each page is submitted. Please see this FAQ for getting the new record id.

Bob
This topic is locked and no more replies can be posted.