use {var:} in php function

Use a CF variable in a PHP function.

Overview

The issue occurs when trying to reference a CF variable directly within PHP code, as the variable placeholder syntax is not valid PHP.
To access the variable, use the `$this->get()` method within your PHP function, passing the variable name as a string.

Answered
Connectivity v6
ri riccardoc 17 Nov, 2020
Hello, I have a switch function with {var:table1.row.tblicon.Private} as data provider, now I have to use the same variable in a php function but I can't figure out the way to call it, I need to do something like
$myfield = {var:table1.row.tblicon.Private};
can somebody help me?
Max_admin Max_admin 18 Nov, 2020
Answer
$this->get("table1.row.tblicon.Private");
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.