Buy Now
Sign in

multipage - each page individually saved

hcohl , October 03 at 15:44
H
hcohl
I've built a pretty bulky form in cf5. Now and again there are problems with users whose data disappears during the filling process. As a solution to this problem, I would now like to build a form as a multipage form.
After each page, the data should be written to the database. Is that possible? Where can I find instructions?
I have built a save-data-action on each page and assigned the same model name. Nevertheless, individual database entries are generated for each page. But I need the data of all pages in the same database table.    
GreyHead
Hi hcohl,
I think that Max posted somewhere else that you need to get the new record ID after the first save and save that to the User session to be used in later submits+saves.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
H
hcohl
How can I get a new record ID after the first save?
H
hcohl
Please - I need a detailed instruction:
in a multi-page-form: how to save each page individually without each save-data-action creating a new record.
I have built a save-data-action on each page and assigned the same model name. Nevertheless, individual database entries are generated for each page. But I need the data of all pages in the same database table.    
- Must the "Model Name" be the same to all data-save-actions?
- Is the Data provider: {session:multipage} or {data:}?
- where to put the variable: {var:save_data??.data.aid}?
- in {var:save_data??data.aid} is ..._data??... the Model Name of the save-data-action of the event before?
healyhatman
Put a multipage action first.
Use a switch to check for {session.empty:identifer} - if it's empty, save a new one to session. Use {uuid:}.
Then do a read data, checking for an entry where identifier:{session:identifier}
In the "found" event put a save data action set to update, update condition where identifier:{session:identifier}
In the "not found" event put a save data action set to insert. Again, identifier:{session:identifier}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
H
hcohl
Thank yor for your help. But I need more detailed instruction please:
- Where do I have to put the switch? In the load event?
- what does it mean: if it's empty, save a new one to session. Use {uuid:}.
- I have a problem with read data: there is no "found", only "notfound".
Attachments
switch.jpg
switch.jpg
(75.61 KiB)
53 Downloads/Views
healyhatman
For the read data: Click the gear icon, click events, tick the appropriate box.
For the switch (which you would need at the start of each submit event, just after a MultiPage action) you would have a switch with {session.empty:identifier} and the events would be true, false. When I say "use {uuid:}" I mean use a save to session action (if the switch event in the previous step is empty) called "identifier" with the data provider set to {uuid:} .
If that's still not clear enough you might need to read the instructions and look at the demo forms, or pay me to do it for you.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
H
hcohl
If you do it for me, what would be the price?
I have a very simple testform with 3 pages and one textfield in every page.
(Later, if the safe action works, I have to put a lot more fields and functionality... I am sure, I will need you later, if you agree.