Hi,
I have a multiple page form. The user goes through the pages entering his information and then submits the form. But when you go back to the start of the form again, the data that the user submitted is still there, it hasn't been cleared out and the default values added back, for the next person to enter their information.
Basically this is a prize draw form, that is being used at a trade show. So, the same form is used over and over again, but by different people. I need a way to clear the form values after the form has been submitted. Is there a way to do that in chronoforms in the On Submit event, after the form data has been saved in the database and the emails with the information sent?
If I can't do it in Chronoforms form, is it possible to put something in the Thank you page that the user gets redirected to after they have finished submitting the form. Is there a way to clear the form data/user session information so the next person going to the form will get default values again?
I tried adding the following to the thank you page:
cf_datafields is the unique session key I added in the Session to Data action.
I also tried:
to try to clear out all of the user's sesion data.
Is there a way to get the chronoforms form's session id to clear it?
I need to get this working for tomorrow as the trade show is starting tomorrow.
Thank you for any help on this.
I have a multiple page form. The user goes through the pages entering his information and then submits the form. But when you go back to the start of the form again, the data that the user submitted is still there, it hasn't been cleared out and the default values added back, for the next person to enter their information.
Basically this is a prize draw form, that is being used at a trade show. So, the same form is used over and over again, but by different people. I need a way to clear the form values after the form has been submitted. Is there a way to do that in chronoforms in the On Submit event, after the form data has been saved in the database and the emails with the information sent?
If I can't do it in Chronoforms form, is it possible to put something in the Thank you page that the user gets redirected to after they have finished submitting the form. Is there a way to clear the form data/user session information so the next person going to the form will get default values again?
I tried adding the following to the thank you page:
$session = JFactory::getSession(); $tmpUser = $session->get('user'); $tmpUser->cf_datafields = 0; $session->set('user', $tmpUser);
cf_datafields is the unique session key I added in the Session to Data action.
I also tried:
$session = JFactory::getSession(); $session->clear('user');
to try to clear out all of the user's sesion data.
Is there a way to get the chronoforms form's session id to clear it?
I need to get this working for tomorrow as the trade show is starting tomorrow.
Thank you for any help on this.