Just getting started with ChronoForms and I'm very impressed with the little I've learned so far. Nice work!
I have two (2) questions:
1. Below is some PHP code I want to use to define the variable $to (in bold below). Where do I place this code in ChronoForms to define the variable?
2. Now that it has be defined, I would like to use it to set the Dynamic To in Setup Emails. What is the syntax I need to use to set the $to varible in the Dynamic To?
Thank you for your help and support.
John
<?php
$db =& JFactory::getDBO();
if ( defined( 'MULTISITES_ID')) {
$site_id = JFilterInput::clean( MULTISITES_ID, 'alnum');
}
else {
$site_id = 'master';
}
$query = "SELECT * FROM #__contact_details WHERE alias='$site_id'";
$db->setQuery($query);
$row = $db->loadObject();
$to = $row->email_to;
?>
I have two (2) questions:
1. Below is some PHP code I want to use to define the variable $to (in bold below). Where do I place this code in ChronoForms to define the variable?
2. Now that it has be defined, I would like to use it to set the Dynamic To in Setup Emails. What is the syntax I need to use to set the $to varible in the Dynamic To?
Thank you for your help and support.
John
<?php
$db =& JFactory::getDBO();
if ( defined( 'MULTISITES_ID')) {
$site_id = JFilterInput::clean( MULTISITES_ID, 'alnum');
}
else {
$site_id = 'master';
}
$query = "SELECT * FROM #__contact_details WHERE alias='$site_id'";
$db->setQuery($query);
$row = $db->loadObject();
$to = $row->email_to;
?>