Forums

Session variables chronoforms

bestam 30 Jun, 2010
Hello,

I have a chronoforms forms and I want to keep the value of a field, in order to use it on all the other pages

you can help me I do not know how to use the variables of session under joomla 😟

Tanks :wink:
bestam 30 Jun, 2010
Hi BOB,
it is a good start for me, according to what I understood to add the name I must use "$currentSession->set("Name","a_name ");

1 - but how to add the value of a textebox or dropdown a session

2- how to use this value in all the other pages (chronoconnectivity page, Article…)

thank you very much Bob
GreyHead 30 Jun, 2010
Hi Bestam,

What do you actually need to do? Please give me some more info.

Bob
bestam 30 Jun, 2010
Hi,
I have a form chronoforms which contains a dropdown wich takes in value city 1, city 2, city 3.

I want that once the user chooses for example city 1, I post on the page a title "you are connected on city 1".

and to post the same title on all the pages of the site.

Please help me😟
bestam 30 Jun, 2010
Hello,

it is hard has to make 😟 or there is not a solution 😒
GreyHead 01 Jul, 2010
Hi bestam,

I think that you can do this either with a session variable or a cookie.

You can retrieve data from the session with $session->get(...) Check the Joomla docs for more info.

Bob
bestam 07 Jul, 2010
Hello ,

It is OK to put the value session
 
$varsession = JRequest::getVar("select_4");
$currentSession = JSession::getInstance('none',array());
$currentSession->set("Name",$variable);


to recover the variable session from another form

$currentSession = JSession::getInstance('none',array());
$stores = $currentSession->getStores();
$varsession =$currentSession->get("Name","");


Thanks Bob,
Thanks chronoengine :πŸ˜€
This topic is locked and no more replies can be posted.