Forums

Save the draft multipage

creositi 11 Apr, 2018
Hello
I need some help.
How do I save a draft while also loading the data on the page where I am?
Let me explain:
I have a multipage form, I'm on page 2 instead of clicking Continue, I click Save the draft. When I resume the form, the data on page 1 is saved correctly, but those on page 2 are not saved.
GreyHead 11 Apr, 2018
Hi creositi,

It sounds as though you do not have a Save Data action that is run when you click Save the draft??

Note that you need to have the correct record ID in the form data to make sure that the second (and later) Save Data actions update the same record and do not create new ones.

Bob
creositi 11 Apr, 2018
I think so too.
How can I give the action SAVE THE DATA by clicking on SAVE THE DRAFT?
GreyHead 11 Apr, 2018
Hi creositi ,

Your Save the Draft button needs to submit the form so you can then add a Save Data action.

Bob
healyhatman 11 Apr, 2018
One way to do it is give your "save" and "submit" buttons the same name, and a different value. So in the "name" part for your buttons, call them both "action". Then give one the value "save" and the other "submit".

Then in your submit event, just use and event switcher, data source {data:action} and check if its value is save or submit and process accordingly
creositi 16 Apr, 2018
I have this code in the Save the draft
How can I change it?

<a href="http://<?php echo $_SERVER['SERVER_NAME'].str_replace($_GET['event'], 'submit&button1=Salva%20bozza' , $_SERVER['REQUEST_URI']); ?>
" class="btn btn-default form-control A" style="" value="Salva bozza" name="button1" id="button1" type="submit" data-load-state="">Salva bozza</a>
GreyHead 16 Apr, 2018
1 Likes
Hi creositi,

Delete it and use a ChronoForms button instead. I have no idea what that code is supposed to do.

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