• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Fill field based on DB selection dropdown

Fill field based on DB selection dropdown 6 years 9 months ago #37081

  • nvsdesign
  • nvsdesign's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Hello,

I have a field called "user". This field pulls user data from the database with this code:
//<code>
$db = JFactory::getDBO();
$db->setQuery("SELECT `name`, `id` FROM #__users");
$rez = $db->loadObjectList();
$items = "|Selecteer...\n";
foreach($rez as $r){
	$items .= $r->id."|".$r->name.' ('.$r->id.')'."\n";
}
return trim($items);
//</code>

I need a second field that pulls the email from the selected user in the dropdown, so that I can add this email address to the 'send to' field.

Normally I would change the 'id' to 'email' and add {user:value} to the 'send to' field, but in this case I also need the user ID to upload a PDF of the form to my RSFiles user folder.

Can anyone tell me how to populate a second field with the email address from the user that I've selected in the dropdown?

Regards, Niels
The administrator has disabled public write access.
The following user(s) said Thank You: platinum12
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!