Forums

Info expires before form submitted

jmeidal 09 Feb, 2016
I have a sixteen page multiform which finally works great! However I have found that if the applicants fill out the form over more than 30 minutes I do not have the first dozen fields saved in my database or email messages. When quickly filled out in under 5 minutes it always work.

I understand my form is large, but is there any way within ChronoForms to hold the info longer in the client browser?

Or, is there a way to at least not allow the final Submit button to work unless primary required fields are still held in the browser?

Thanks!
GreyHead 09 Feb, 2016
Hi jmeidal,

The quick fix is probably to make the User session longer - the setting is in your Site Admin > Global Configuration.

With a Multi-page form that users may take some time to complete I'd also suggest that you do a DB Save after each page to update the new/changed data so that there is a record that can be re-loaded if needed. You can do this with a single record in the table if you pass the record id between pages.

Bob
jmeidal 23 Feb, 2016
Thanks, I'm finally trying to tackle this step of saving into the database after each page. Extending the session limits did help however too.

I assume I should start on a page following initial input of data (i.e. Page 2)?

Should my first Data Save be forced to INSERT the record, and the rest be unforced to UPDATE?
jmeidal 23 Feb, 2016
Also, I assume I need to match conditions as I go along. How does this work?

I am putting an "id" field in each page, disabled.

Would something like this pull the saved id and track it through repetitive saves?
<?php
return array('id' => $form->data('id'));
?>
GreyHead 24 Feb, 2016
Hi jmeidal,

After the first DB Save action ChronoForms will add the id* of the new record to the $form->data array. If the second page has a hidden input with the same name then the id will be carried forward to the next page load.

The DB Save action uses Joomla! code that will check the record id; if none is set, or it doesn't exist then a new record is created; otherwise the existing record is updated.

Bob

* Actually the primary key - while this is often the id column I recommend that you don't use that column name as it can get confused with article ids. I use cf_id instead.
This topic is locked and no more replies can be posted.