Buy Now
Sign in

Multi Page form with Back button not saving data in session

Dtorr1981 , July 04 at 13:47
D
Dtorr1981
Hi Guys,
I'm still working on a 10 page multi-page form, the form itself is working without a problem however, I have a 'back' button (using a link) set up on each page so should a user which to go back to change anything in the form they can. As this is confidential data I would really like to not save any of the information from the form in to the database and just keep it as being sent as an email.
I have changed the data provider in the Multipage action to {data:} and to {session:multipage} in the Section and and these now seems to save 'most' data however, the dates selected in the date picker default back to 20/07/2004 after clicking back which is incorrect as all dates selected in the test were in this year. Additionally, if you click back through all the way to the 1st page of the form, the data on this page is not saved in the session data. As this is just the 'load' section there is no room to add {session:multipage} as there is no section. Does anyone know how I can rectify these 2 issues?
I look forward to your response.
Best Regards
Donna
Founder/Web Developer at Site Wide Design
GreyHead
Hi Donna,
I have just replied to a similar post of yours.
For the date I think you may need to process the data so that the saved date is re-formatted to the display date format.
For the first page you can add a multi-page action but you may need to manage it to detect if this is a new submission or the user editing a new submission.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
Dtorr1981
Hi Bob,
Thank you Bob with your guidance this seems to be working, I'm not sure how to detect if it is a new user or not though? I have tested by visiting the form from different browsers and this presents me with a blank form, is this sufficient to assume that the sessions are not being continued?
Best Regards
Donna
Founder/Web Developer at Site Wide Design
healyhatman
You could do an event switcher on the first page with the data source set to {session.empty:first_run} and if it is true then it's the first time the page has been run and you act accordingly. On the first submit event you use {session.set:first_run$1} to set the switch value.
Or you have a copy of the load event that does everything you want to do when it's not the first time you've run the form, and have the BACK button of the second page point to that event instead of the first event.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
D
Dtorr1981
Hi Healyhatman,
Thank you for your response, this sounds exactly what I need.
I have added an event switched in the 'load' part of the settings and added the 'Display Section' to both A and B, I have then set the Data Provider for A to {session.empty:first_run} and for B to {session:multipage} is this correct so far?
As for the first button submit, is this the action on the design tab? Which field would I add that value?
Thank you for your support and patience.
Best Regards
Donna
Founder/Web Developer at Site Wide Design
D
Dtorr1981
Good Morning All,
Is anybody able to advise me on the event switcher queries mentioned above?
Regards
D
Founder/Web Developer at Site Wide Design
healyhatman
Just post a form backup
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
D
Dtorr1981
Thank you, please find form backup attached.
Regards
D
Attachments
Founder/Web Developer at Site Wide Design
healyhatman
No. The event switcher should have as its event the possible values of the data provider. In our case, that would be true or false. So instead of "A,B" it needs to say "true, false"
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
healyhatman
The data provider of the form should definitely NOT be "{session.empty:first_run}"
Under the "true" display section, data provider can be empty or set to {data:}
Under the "false" display section, data provider should be {session:multipage}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
D
Dtorr1981
Thank you healyhatman,
I am still experiencing the issue however that if you click back to the first page of the form the data entries are not stored? I think I still may be missing something
I have updated the event switcher as mentioned above and included a backup below.
Thank you so much for your help with this, it is way beyond my knowledge.
Regards
D
Attachments
Founder/Web Developer at Site Wide Design
healyhatman
Theyre probably stored in the session, they won't automatically populate the form I don't think unless you tick the mix with global data checkbox. And make sure you multi-page action is BEFORE the display section action.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
D
Dtorr1981
Thank you, I still must be doing something wrong as now my form doesn't show at all when I load the page. The page loads, but the form section is blank. I have included a screenshot of my settings below. I'm sure it must be something simple I am missing.
Thank you again. I'll be so glad to get this form finished.
grant-form.png
Attachments
grant-form.png
grant-form.png
(942.72 KiB)
101 Downloads/Views
grant-form.png
grant-form.png
(307.37 KiB)
112 Downloads/Views
Founder/Web Developer at Site Wide Design
healyhatman
Why did you set the data provider of the event switcher to {data:}?
It's {session.empty:first_run}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
GreyHead
Hi Dtorr1981,
What is the code you are using in the Event SWitcher - I'm guessing that maybe it isn't returning 'true' or 'false'. That would explain the missing form.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
Dtorr1981
Thanks Healyhatman, I missed that {session.empty:first_run} had to be the provider in the event switcher in your previous post.
@Greyhead - I haven't got any code in the Event Switcher, there isn't anywhere to add any code?
I'm still getting a blank form however, it did show the first time, so I'm guessing that the error may be the event switcher still. I have included a back up of my form. The live form can be viewed here.
Attachments
Founder/Web Developer at Site Wide Design
healyhatman
When he says "code" he means the data provider, the shortcode you have in there.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
GreyHead
Hi Dtorr1981,
Apologies, my head is still working with CFv5 where you could add PHP directly. Does your {data:} return the strings 'true' or 'false'?
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
healyhatman
no he put it there accidentally Bob it's supposed to be {session.empty:first run}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
D
Dtorr1981
Hi Guys, I have updated to {session.empty:first_run} on the Event switcher event and added {session.set:first_run$1} to the submit action under the value option - is this correct? My form is still blank so I will wait to see if the session times out after 15 mins.
I had previously omitted the {session.set:first_run$1} from the submit button.
Regards
D
Founder/Web Developer at Site Wide Design