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
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
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
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.
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
Good Morning All,
Is anybody able to advise me on the event switcher queries mentioned above?
Regards
D
Thank you, please find form backup attached.
Regards
D[file=10777]Grant_Application_Form_18_Jul_2018_06_04_16.cf6bak.zip[/file]
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"
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}
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[file=10784]Grant_Application_Form_19_Jul_2018_05_29_08.cf6bak.zip[/file]
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.
Why did you set the data provider of the event switcher to {data:}?
It's {session.empty:first_run}
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
When he says "code" he means the data provider, the shortcode you have in there.
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
no he put it there accidentally Bob it's supposed to be {session.empty:first run}
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
If nothing is showing then one of your display section actions is wrong. And While developing you should have a debug action in each event. So one in load, one in submit, etc etc