Hi,
in my form a have e-mail form plugin, in form i have dbjoin element - multiselect to user id (wiadomosci___filia_partner).
So i have users id, now I want set e-mail to selected users but I don't know to get data (id user) from form (dbjoin).
I try this:
But this don't work
So i try do similary i calc element in this form a put
Ajax calculation : YES
Ajax observe fields: '{wiadomosci___filia_partner}'
And I see e-mail only first selected user.
What I am doing wrong?
in my form a have e-mail form plugin, in form i have dbjoin element - multiselect to user id (wiadomosci___filia_partner).
So i have users id, now I want set e-mail to selected users but I don't know to get data (id user) from form (dbjoin).
I try this:
Code:
$myId[0]= $this->data['wiadomosci___filia_partner_raw'];
//$myId = is_array($myId) ? $myId[0] : $myId;
if (!empty($myId)) {
foreach ($myId as $v) {
$myUser = JFactory::getUser((int)$v);
$email=$myUser->get('email');
return $email;
}
}
return '';
So i try do similary i calc element in this form a put
Code:
$myId[0]= '{wiadomosci___filia_partner_raw}';
//$myId = is_array($myId) ? $myId[0] : $myId;
if (!empty($myId)) {
foreach ($myId as $v) {
$myUser = JFactory::getUser((int)$v);
$email=$myUser->get('email');
return $email;
}
}
return '';
Ajax observe fields: '{wiadomosci___filia_partner}'
And I see e-mail only first selected user.
What I am doing wrong?