Forums

Insert Email Address from Drop Down?

cavern 11 Jul, 2007
Is there anyway to use a drop down to select a value, and add that to the recipient list?

Example:

--Drop Down-- Select Person:

Option: Jon ([email]jon@domain.com[/email])
Option: Bob ([email]bob@domain.com[/email])

I know how to do this via normal PHP, but I cant seem to get it to work properly with ChonoForms, any advice would be appreciated.
GreyHead 11 Jul, 2007
Hi cavern,

It should work pretty much the same as it does in php. Please can you post some code that you've tried for us to have a look?

Bob
Max_admin 11 Jul, 2007
Hi Carven, Bob,

At the on Submit before mail box please put this :

<?php
$recipient = $rows[0]->recipient.",".$_POST['dropdown_fieldname'];//this is your drop down field name here
?>
//please check from other posts or at chronocontact.php that this spelling is right : $recipient = $rows[0]->recipient


cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.