How to get global variable via php?

te tempus 19 Feb, 2022
Hi!
​
Thanks for great component, using it for about 10 years. And please explain
​
If I'm trying to get global var, I'm writing {global:var_name}
​
But if I need to get global variable value by php code, how to write?
​
It is no explanation here https://www.chronoengine.com/faqs/74-chronoforms/chronoforms6/5289-variable-shortcodes
​
Thanks
Gr GreyHead 20 Feb, 2022
Hi Tempus,
​
Please try turning the Debugger on - you should then see all the variables with their names and values.
​
Bob
te tempus 21 Feb, 2022
1 Likes
Thanks, but it didn't help. Somehow global vars never show up in the Debugger.
I am taking their names from admin site of the CF7.
​
I've tried different php codes to get global var value, but I can not guess the right one
Max_admin Max_admin 30 Sep, 2023
what are you trying to get ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sh sh-si 30 Sep, 2023
The question is: How to access global variables in php?

I've set up some global vars on "Form" level and need to access them inside a custom code with php.
Like https://www.chronoengine.com/users/profile/86267 "I've tried different php codes to get global var value, but I can not guess the right one"

It's about clientId & clientSecret which i need to reuse in different custom code actions.
Max_admin Max_admin 01 Oct, 2023
generally any variables set with
$this->set("varname", value);
are available with
$this->get("varname");
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sh sh-si 02 Oct, 2023
Hey,

i'm talking about:
Joomla Backend => Chronoforms 7 => Upper Menu "Settings" => "Settings Manager" => Global Vars.

How can i access the values?
$this->get("varname");
where "varname" is the name of the variable doesn't work...
Max_admin Max_admin 02 Oct, 2023
1 Likes
{global:varname}

you can not use that in PHP, unless you set them through a variables action
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.