adriannunez
Member
Hello
I'm trying to send emails to addresses based on users id's, where the id is sent in the URL where the form is published (in front page).
This is my code:
The URL is like this:
index.php?option=com_content&view=article&id=17&var1=357
where var1 is the Joomla's user ID
I did a test of that code in a calc element and it returns the correct email for every user id. The issue is that where this code is in an email form plugin the variable $foo1 is always NULL.
I tried it plublishing the form with {loadposition ...} and with a content plugin as Troester suggested me in the community forum: {fabrik view=form id=13 var1=[var1]}
It never returns an email address. But if I try {fabrik view=form id=13 table___element=[var1] var1=[var1]} the value of var1 is correctly displayed in the respective element.
Please, help me to get the email plugin working with this value from the URL.
Thanks in advance,
Adrian
I'm trying to send emails to addresses based on users id's, where the id is sent in the URL where the form is published (in front page).
This is my code:
Code:
$jinput = JFactory::getApplication()->input;
$foo1 = $jinput->get('var1');
$db =& JFactory::getDBO();
$query_email = "SELECT email FROM p4p7n_users WHERE id LIKE $foo1 LIMIT 0,1";
$db->setQuery($query_email);
$email = $db->loadResult();
return $email;
The URL is like this:
index.php?option=com_content&view=article&id=17&var1=357
where var1 is the Joomla's user ID
I did a test of that code in a calc element and it returns the correct email for every user id. The issue is that where this code is in an email form plugin the variable $foo1 is always NULL.
I tried it plublishing the form with {loadposition ...} and with a content plugin as Troester suggested me in the community forum: {fabrik view=form id=13 var1=[var1]}
It never returns an email address. But if I try {fabrik view=form id=13 table___element=[var1] var1=[var1]} the value of var1 is correctly displayed in the respective element.
Please, help me to get the email plugin working with this value from the URL.
Thanks in advance,
Adrian