Forums

Chronoforms V7 multipage form keepalive

bytekultur 29 Jun, 2021
I need to ask again regarding the keepalive function. In this post I asked for chronoforms V5, now I am upgrading that form to CF 7:
https://www.chronoengine.com/forums/posts/t107127/session-keep-alive-lost-data-on-multip-page-form-cf-v5

It's a 7-page submission form with 100s of fields. I expect the data to be in a session for 30 minutes currently, as that's the session time I set in the global configuration of Joomla. When I submit a few pages and then reload (currently still building and thus testing), it suddenly brings me back to page 1, with all fields empty.

With the debugger enabled, I can see that the values are still available in the array (so I assume in the session), but the form makes me fill all those fields again. In the URL I see that it should be loading page 4 or 5, but it shows the first page empty, as if I forgot to fill in something there.
If I deliberately load that first page (through calling it's URL), the data is there. But why is it taking me to the first page on reload?

This is not only time consuming for my testing, but also a problem for the user, as they sometimes need to get data together and then could be going back and forth between the pages. How can I make sure the data in the session is always used and does not have to be filled in again?

I can imagine a workaround by adding a page navigation for the users, so they can actually load the page through a URL instead of a reload, but even if practical, that isn't the solution.

Thanks a lot for any hints!
GreyHead 02 Jul, 2021
Hi bytekultur,

The best solution I know is to save the data into the database table after each page is submitted but including an entry status = 'provisional'. Then the data is available for as long as you need it. On final submission change the status entry to 'complete' and use a cron job to run every day or so to remove any records with the provisional status that have been unedited in the last 24 hours.

Bob
bytekultur 02 Jul, 2021
Thank you. In CF5 it was possible with the keepalive behaviour of joomla, which you say is not needed in CF6 any more, so I assumed that applies to CF7 as well. Or can I use keepalive in CF7 to improve that behaviour? Otherwise, I'd try that.
You need to login to be able to post a reply.