Hi,
I have a form in J1.5 which has a country combobox. Based on the country the users chooses I would like to send the e-Mail to a different e-Mail address. So our guys in germany should get the e-Mail, if someone chooses germany in the form. Seems to me, that I have to put in some php, but where?
Thanks and regards,
Rudolf
Thanks for your quick answer, but faq 32 seems not to be the right one, which one did you mean?
Thanks and regards,
Rudolf
H Rudolf,
at the onsubmit before email try this :
<?php
if(JRequest::getVar('combobox') == 'germany')$emails[0]->to = 'germanguys@domain.com';
?>
Cheers,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi Rudolf,
Sorry, it's FAQ 31 "How can I safely show a list of e-mail addresses?"
Bob
Hi Bob,
I tried this, but no extra e-Mail is sent. I checked the sourcecode and can't find the codeblock which sends the extra e-Mail, maybe that's why it doesn't work? I checked uploadandemail() method in chronocontact.php
Thanks, Rudolf
Hi Rudolf,
Ah . . . Max has probably changed the code in v3.0, sorry I'm out of date . . .
The code is $email->to for the static email and $email->dto for the dynamic field, see the code around line 432 in chronocontact.php
Bob
Ok, thanks, I will add my e-Mail adresses to the ->to value.
Thanks and best regards,
Rudolf
Hi Rudolf,
did you try my snippet above ? it should do what you need assuming you have the dropdown and at least one email setup and nebaled regardless of the TO emails of it.
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi,
I didn't have time to try it out, but I am pretty sure, that this will work. I will come back once I tried it.
Thanks for your great support.
Best regards,
Rudolf