Forums

Add variables for field: {site:sitename}, {site:mailfrom},{site:fromname}, {site:replyto},{site:replytoname}, {site:CONFIG_NAME}

koreshs 12 May, 2017
Very, very much I ask you to add support of variables in fields.
These variable values are the parameters of the site configuration.
{site:sitename}, {site:mailfrom},{site:fromname}, {site:replyto},{site:replytoname}, {site:CONFIG_NAME}, where CONFIG_NAME is JFactory::getConfig()->getValue( 'CONFIG_NAME' ); .
Especially I ask you to use support:
{site:sitename}, {site:mailfrom},{site:fromname}, {site:replyto},{site:replytoname}.
Max_admin 12 May, 2017
Hi koreshs,

You can get the value of these settings inside a PHP function, then return the value and use the {var:function_name} syntax.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
koreshs 12 May, 2017
Is this how it is done?
{var:JFactory::getConfig()->getValue( 'CONFIG_NAME' )}
Max_admin 12 May, 2017
No, create a new form event, drag PHP function inside and use this code:

return JFactory::getConfig()->getValue( 'CONFIG_NAME' );

Now, in your custom code call this: {var:php_function_name}

where "php_function_name" is the name of the PHP function!

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
koreshs 13 May, 2017
Thank you. I will know this for the future.
But still, getting the email site is norm.
SQL requests and write code every time for this is not good.
This topic is locked and no more replies can be posted.