Syntax for Session Data Handling

Store complex data like arrays in ChronoForms session variables.

Overview

The user needed to store complex data, such as arrays or function return values, using CF session shortcodes but was initially unsure of the correct syntax.
Use the session.set shortcode with a variable shortcode inside it. For example, to store the return value of a function, use the syntax {session.set:mydata$(var:some_function)}.

Answered
Connectivity v6
Pr Proximate 08 Sep, 2018
Hi Community

in the Chronoforms FAQ (https://www.chronoengine.com/faqs/74-chronoforms/chronoforms6/5289-variable-shortcodes) is described that it exists the Session Shortcode.

I am able to store simple Values like:
{session.set:mydata$something}
so if i call
{session:mydata}
it display's something - NICE
But how about storing complex vars like arrays?


How is the syntax to archieve it to store return vars from a function or something in the {data:} into session?
Pr Proximate 08 Sep, 2018
Sorry Sorry Sorry - there is a function for that...
didn't see it...
he healyhatman 09 Sep, 2018
Answer
{session.set:mydata$(var:some_function)}
This topic is locked and no more replies can be posted.