Forums

How to kill the session?

HerKle 10 Feb, 2012
After the thanks message I would like to have all data removed so that when reopening the form, all fields appear blank. In php I earlier used s.th. like session_kill. Is there anything adaquate available in CF?
GreyHead 10 Feb, 2012
Hi HerKle,

Not tested but at you could use a Custom action with a 'Session to Data' action with 'Clear after' set to Yes; and then unset the $form->data array.

This would probably need to be on the OnSubmit action after the Thank You page so that you didn't delete the data in the middle of the Confirmation page process.

Bob
HerKle 10 Feb, 2012
In my case the "session to data - with clear: yes" had to be placed on the "confirmation page" right after "show thanks message". Putting it on "on submit" after the confirmation page box it showed the effect to delete the data before sending, recording and showing it.
GreyHead 11 Feb, 2012
Hi HerKle,

Well done, that makes sense. Very often these problems take a clear head and a little thought to work out the extact sequence of what is happening with the user and the form data.

Bob
HerKle 11 Feb, 2012
:)

I liked this trans-atlantic co-operation to set up a form for an event which takes place in between us, on Iceland: http://icebreaker2012.eu

And though I validated the form to get rid of the disturbing chronoform links right beneath the texts, I credited you on bottom of the page (where it belongs to my opinion). I believe you earned that well.
GreyHead 13 Feb, 2012
Hi HerKle,

Thank you.

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