koekkoek
New Member
Hello,
We have a form containing a dropdown with a departments list.
The dropdown only contain dept id and dept name
On form submit, we have a mail plugin using php to get the dept email address from a table (using the id as key).
This is the php code : -----------------------------------------
// Get a Joomla DB and Query
$db = JFactory::getDbo();
$query = $db->getQuery(true);
//Get and cast the combo's id value
$tid = (int) '{_vitto_contacts___destinataire_raw}';
//Get the email value
$query->select('id','email');
$query->from('_vitto_contacts'); // This is a fabrik table...
$query->where('id=' . $tid );
$db->setQuery($query);
$dest = $db->loadObject();
//Return the value to plugin
return $dest->email;
-------------------------------------------------------------------
But nothing happens, the mail address remains empty !
Please help, this is an emergency.
Best regards
We have a form containing a dropdown with a departments list.
The dropdown only contain dept id and dept name
On form submit, we have a mail plugin using php to get the dept email address from a table (using the id as key).
This is the php code : -----------------------------------------
// Get a Joomla DB and Query
$db = JFactory::getDbo();
$query = $db->getQuery(true);
//Get and cast the combo's id value
$tid = (int) '{_vitto_contacts___destinataire_raw}';
//Get the email value
$query->select('id','email');
$query->from('_vitto_contacts'); // This is a fabrik table...
$query->where('id=' . $tid );
$db->setQuery($query);
$dest = $db->loadObject();
//Return the value to plugin
return $dest->email;
-------------------------------------------------------------------
But nothing happens, the mail address remains empty !
Please help, this is an emergency.
Best regards