Forums

How to Use save Session & combine with CronoConnectivity?!

galya 03 Jan, 2018
Hello,
I want to build a form , and from that form will need to save session of one variable , and then want to show some Lists using Connectitvity ,, the thing here how connectivity will check the stored session from the Form ?

Here is what iv done so far but didnt work
1- from Form text field lets say ( XYZ ) ,, in the form Setup i did add Save to session [ Here i would prefer to have more clear idea hwo to use this feature ]
2- in connectivity iv added function to read session ( Using Joomla session class )

$session = JFactory::getSession();
$xzy = $session->get( 'XYZ' );

iv got $xyz always NULL


Please advice
Max_admin 04 Jan, 2018
Hi galya,

If you are going to save the variable to the session using the Chronoforms "Save to session" then you will need to read it using the session syntax in Connectivity, otherwise you can use Joomla PHP code in both places.

#1- in Chronoforms, set the action name to any thing, say "myvar" and the value to say "123"
#2- in Connectivity you can use:
{session:myvar} to get the value inside any block/config.
Or you can use \GApp::session()->get("myvar") to get the value inside PHP code

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.