Forums

Back Button on Multipage Form

JerseyGirl 21 Jul, 2016
1 Likes
I created a multipage form, using this as a guideline:
https://www.chronoengine.com/faqs/57-cfv4/cfv4-actions/2658-how-can-i-create-a-multi-page-form.html

I got the form to work "going forward" but also want a "Back" button.

I found this in the forums but it is from over a year ago - is this still the best way to create a back button? Is there anyway to do it without writing jQuery?
http://www.chronoengine.com/forums/posts/f2/t95332.html?page=3

Thanks.
JerseyGirl 22 Jul, 2016
I re-read the post referenced above and realized that is' not quite right for my situtaion; I'm not looking for Ajax submission. So I tried Bob's suggestion of creating a link that looks like a button for my Back button.

I succeeded in making the link that looks like a button, but had a problem with the data still being there when I clicked the back button. If I set the Multipage in the On load event to be "No," then when I click on the back key, the previously entered data is there, which is what I want.

But if I click on Test Form later, instead of getting a blank form (what I want), I see the data pre-populated again... don't want that (which is why there is a warning to set this to "yes" on first page of your form!)

So I changed the Multipage in the On load event to be "Yes" (to refresh), and now when I click on the Back button, I'm taken to a blank form (what I expected but not what I want).

So how do I go back to the first page, and have the data still there, but load the form later and have it be blank?

Thanks...
GreyHead 22 Jul, 2016
Hi JerseyGirl,

It's a bit messy, you have to be able to tell if this is a new form submission or an edit of an existing one. The first step is to clear the saved multi-page data when the form is submitted. You can do this with a Session to Data action in the last On Submit event (after the point where that are any 'back' options). There's a 'Clear Session' option there that you can use.

You could also use a parameter in the back link like &back=true - that would also let you use an Event Switcher to detect whether the data should be re-loaded or not.

Bob
JerseyGirl 26 Jul, 2016
I read the FAQ about using Event Switcher to create a form that goes to page 2 or 3 depending on a selection of a radio button. Was able to get that working.

But I am having trouble applying it to my situation. I won't have a radio button like in the event switcher tutorial; how do I get the test "if back=true, then load session data" tied to an event? And which event - is it page1 (there is only 1 back button, on page 2). Or do I create a new event?

Thanks.
JerseyGirl 26 Jul, 2016
I read the FAQ about using Event Switcher to create a form that goes to page 2 or 3 depending on a selection of a radio button. Was able to get that working.

But I am having trouble applying it to my situation. I won't have a radio button like in the event switcher tutorial; how do I get the test "if back=true, then load session data" tied to an event? And which event - is it page1 (there is only 1 back button, on page 2). Or do I create a new event?

Thanks.
JerseyGirl 26 Jul, 2016
I read the FAQ about using Event Switcher to create a form that goes to page 2 or 3 depending on a selection of a radio button. Was able to get that working.

But I am having trouble applying it to my situation. I won't have a radio button like in the event switcher tutorial; how do I get the test "if back=true, then load session data" tied to an event? And which event - is it page1 (there is only 1 back button, on page 2). Or do I create a new event?

Thanks.
francescocartei 04 Sep, 2016
So, to have a "Back button" how can I do?🙂
JerseyGirl 16 Oct, 2017
Armandocurcio - I would switch to Chronoforms 6 for this - it's easier - look at the demo form for multipage.
This topic is locked and no more replies can be posted.