Forums

Random Missing Data from Multipage form

antigeek 02 Mar, 2017
Hi

Not totally sure if this is a bug or not and I have reviewed the FAQ at https://www.chronoengine.com/faqs/52-cfv4/cfv4-emails/2549-some-email-data-is-missing.html

We have a multipage form with a few bells and whistles🙂 see https://www.chronoengine.com/forums/posts/t102635/multi-and-normal-file-uploads-not-working-in-multipage-form.html#363007

Since getting this built the client has complained of incomplete emails that have come through (roughly 30 of 100 and at random), it is odd as the form should't go to the next step with out validated content ( therefore impossible to be user error).

It seems to happen mostly on chrome on mac but have also had chrome windows users with same problem....Both the client and myself has tested on these without issue!?

I have tested the form myself on various computers, devices and browsers(see attached debug)...with no issue, however they have forwarded through numerous incomplete submissions to me (also see attached).

The only thing I am unsure of is in the debug there is an
array {
}
....In the errors debug window, but I think that is normal?

Is there anyway of finding out what might be causing this? ...and fix it?

Look forward to hearing from you!
GreyHead 02 Mar, 2017
Hi antigeek,

I'm afraid that I can't tell from the images what data is missing. The answer may be that you need to add server-side validation to do the final checks for completeness at each stage.

Bob
antigeek 02 Mar, 2017
Thanks for responding so quickly GreyHead!

Seems I forgot to attach the all important image of the missing data email!!
As I mentioned they have received quite a few like this but the occurrence and data thats missing seems quite random!

Is there a post on how to implement the server side validation? What does this do exactly? (......short version)

Thanks
Greg
GreyHead 02 Mar, 2017
Hi antigeek,

Ok I think I see what is happening here. In that example most of the early data is missing. My guess is that this is a a multi-page form using the multi-page action which saves the data in the Joomla! User session. BUT the User session will time out if the user is inactive for a while - the default is 15 minutes. This can easily happen with a long form if something happens to divert the user - or they have to go look up information.

IMHO the best solution is to save the data to a database table after each page submission and update the same record with the following pages. That way you have each page safely saved and if there is any delay only the current page will be affected - and the client side validation will catch that.

To make this work you need to add a record identifier after the first page save - you can use the record ID. I would also add a status column to the table to distinguish between partially complete forms and those that have been 'finally' submitted.

There is a action for Serverside validation which included some basic validations - like 'not empty'. I would always recommend that you use this for any critical forms.

Bob
antigeek 08 Mar, 2017
Hi Bob
Sorry for not responding sooner....super busy week!
Thanks for your help.. but could you please clarify the following

To make this work you need to add a record identifier after the first page save - you can use the record ID. I would also add a status column to the table to distinguish between partially complete forms and those that have been 'finally' submitted.



I have created a table and connected and configured a db save in the submit action as seen in attached image. But I can't seem to find a "record identifier" or record ID ?
I am also unsure about how I would add the status column ( do you mean add this to the database via phpmyadmin? )

Also is the server validation just added to the submit function or to each page?

Thanks again for your help!
GreyHead 09 Mar, 2017
Hi antigeek,

ChronoForms adds the new record ID to the form data after a DB Save action so you need to add that to a hidden input to be included on the next page so that it can be used with the next DB Save to update the previous record.

I'd just add a new column in PHPMyAdmin - name 'status' type VARCHAR(8)

I would add serverside validation after each page so that you are sure that page is complete before updating the saved record.

Bob
antigeek 20 Mar, 2017
Hi Bob

Sorry still not sure about a couple of things with this

I have created the 'status' column in PHP my admin
I have linked the database and setup a savedb action for each page
- With this I was a little unsure but have put not empty validation for the fields within the corresponding page only

I have added server side validation action to each page
I have added a hidden field to each page and given it an id of "status"
- this is where I start getting lost.

save the data to a database table after each page submission and update the same record with the following pages.



Just not sure how I am meant to put all the pieces together here. If possible can I please PM you a login to the site to take a look?

Thanks
Greg
GreyHead 20 Mar, 2017
Hi Greg,

By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.

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