Hello,
I was wondering how to empty a data session when clicking on a link ?
I was wondering how to empty a data session when clicking on a link ?
Hi laurentmartin,
You can't do it *just* by clicking on a link but you could have the link go to a form that empties the session data and then passes the user on somewhere else.
Bob
You can't do it *just* by clicking on a link but you could have the link go to a form that empties the session data and then passes the user on somewhere else.
Bob
Hi Greuhead,
Yes, this is what i need to do : Click on a link in an article, it load my form and empty the data session before displaying the form.
How to do this ?
Yes, this is what i need to do : Click on a link in an article, it load my form and empty the data session before displaying the form.
How to do this ?
Hi laurentmartin ,
In a CustomCode action in the On Load event
Or possibly better if it will work with your process flow: Turn on the Clear session option in the last Session to Data action so that it isn't stored.
Bob
In a CustomCode action in the On Load event
<?php
$session =& JFactory::getSession();
// change the next two lines if you have specified a session key or namespace
$session_key = $form->form_details->name;
$session_ns = 'default';
$session->clear('_chronoform_data_'.$session_key, $session_ns);
?>Or possibly better if it will work with your process flow: Turn on the Clear session option in the last Session to Data action so that it isn't stored.
Bob
Hi Bob,
Thanks for the advice i used this: "Turn on the Clear session option in the last Session to Data action"
It worked weel
Thanks for the advice i used this: "Turn on the Clear session option in the last Session to Data action"
It worked weel
This topic is locked and no more replies can be posted.
