Forums

Multi-Page form - Received email with one field complete

stereoworld 24 Sep, 2013
Hi peeps,

Firstly cheers for this excellent plugin. It's saved me about a million hours of Joomla-induced grief.

The issue I'm having is the following:

I have a multi-page form live at the moment. 7 pages, tested, fields are validated where they should be and everything works fine. It's basically a giant application form.

However... the client received a blank application form today, apart from one field - a text area. Everything they've received up until then is fine and in compliance with what they wanted. The application was saved into the database too, but still with the same blank fields (and 1 completed one).

Has this error or something similar happened to anyone before? I'm trying to narrow this down but I keep scratching my head.

I've fired a couple of tests through and they still come through fine. My only guess is that this particular applicant had Javascript disabled (meaning he could go through the process without filling anything out), but that doesn't explain why only one field was complete. Maybe he left the form for an extended period of time and the previous session expired? How long is the data saved for?

Your help would be much appreciated.

Thanks!
Tom
GreyHead 24 Sep, 2013
Hi Tom,

The data saved to the User session is kept as long as the session is alive. It's a Joomla! site setting and is 15 minutes by default. This is fine for a form where the user knows the answers but not where they may have to research something (or get distracted). You can extend the session fairly safely. Or you can turn on the Load Keep Alive option in the Show HTML action(s).

If the form data is at all complex I recommend that you save it to the Db at the end of each page. You should probably also add some serverside validation to catch null entries.

Bob
stereoworld 25 Sep, 2013
Hi Bob.

Thanks for that advice, it worked beautifully - after every multi page event, an email is sent out containing the data from that particular page and the subject line is a dynamic field containing the applicants name to avoid confusion.

Regarding Database saving - when a DB save occurs after a page save, will it update the same entry, or just create a new one after every page? Is there an option to define between the two?

Either way, you've helped me SO much (and hopefully saved my company a very important client!)

Cheers,
Tom
GreyHead 28 Sep, 2013
Hi Tom,

You need the DB Saves, after the first to update the same record. To do this you need to grab the Primary Key ('cf_id' if it's a ChronoForms created table) of the new record and keep that with the form data.

Please see this FAQ for getting the Primary key value.

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