I've seen lots of posts that ALMOST showed what to do, but if there is a FAQ or other tutorial on this, I'm sorry for missing it.
I have created a dropdown menu where the user selects the topic. Based on what they select, the submit would fire off an email to a specific recipient. The recipient is determined by what they selected in that dropdown menu.
So, a dropdown list of:
Favorite color:
green
blue
yellow
If they select "green" it goes to Joe, if they select "blue" it goes to Sue, etc. If you can point me to instructions on this, or any other help, I would certainly appreciate it.
Thanks!
I have created a dropdown menu where the user selects the topic. Based on what they select, the submit would fire off an email to a specific recipient. The recipient is determined by what they selected in that dropdown menu.
So, a dropdown list of:
Favorite color:
green
blue
yellow
If they select "green" it goes to Joe, if they select "blue" it goes to Sue, etc. If you can point me to instructions on this, or any other help, I would certainly appreciate it.
Thanks!
Hi CharlieMon,
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.
Bob
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.
Bob
Ack, sorry, should have mentioned that: 4.0 RC3.0 on Joomla 1.7. Thanks!
We're close...I read through that post last week, but I'm getting this error:
You must provide at least one recipient email address.
If I put an email address in the static "to" field, the code from this post seems to be ignored. So, how do I use this nice code which dynamically creates the recipient? I must be missing something fundamental.
You must provide at least one recipient email address.
If I put an email address in the static "to" field, the code from this post seems to be ignored. So, how do I use this nice code which dynamically creates the recipient? I must be missing something fundamental.
Hi CharlieMon,
Can you send an email with a "Dynamic to" (no static) fine ?
Regards,
Max
Can you send an email with a "Dynamic to" (no static) fine ?
Regards,
Max
If I leave the static "to" field blank and enter an email address in the dynamic "to" field, I get the same error message.
charlie
charlie
Hi CharlieMon,
Please post here the code and settings you are using.
You can't use an email address in a Dynamic box - only an input name will work there.
Bob
Please post here the code and settings you are using.
You can't use an email address in a Dynamic box - only an input name will work there.
Bob
Bob - thanks for the assistance. If I can get this to work, I'll have a nice fat project to do, it all comes down to getting this working. If we can, then many beers are coming your way 🙂
I have tried the following in the dynamic "to" field, none worked:
a real email address
emails
$emails
recipient
$recipient
but it only seems to work with an email address in the static "to" field, which isn't what we're after. Here is the code I'm using in the "code" tab:
custom code - onsubmit:
mode - controller
action label - onsubmit
I'm using "xx" above to hide the actual email addresses I'm using. Then, in the "emails" tab, I have:
Email - onsubmit
Enabled - yes
Action label - onsubmit
Static to - blank
Dynamic to - see above, tried various things here
Again, thanks, this will be awesome once it's working.
charlie
I have tried the following in the dynamic "to" field, none worked:
a real email address
emails
$emails
recipient
$recipient
but it only seems to work with an email address in the static "to" field, which isn't what we're after. Here is the code I'm using in the "code" tab:
custom code - onsubmit:
mode - controller
action label - onsubmit
<?php
$recipient = JRequest::getString('recipients', 'em1', 'post');
$emails = array (
'em1' => 'xx@gmail.com',
'em2' => 'charlie@xx.net',
'em3' => 'info@xx.com'
);
$form->data['email_to_use'] = $emails[$recipient];
?>I'm using "xx" above to hide the actual email addresses I'm using. Then, in the "emails" tab, I have:
Email - onsubmit
Enabled - yes
Action label - onsubmit
Static to - blank
Dynamic to - see above, tried various things here
Again, thanks, this will be awesome once it's working.
charlie
Hi CharlieMon,
A quick answer as it's nearly midnight here. If you are putting the email into the 'email_to_use' form data entry here:
Bob
A quick answer as it's nearly midnight here. If you are putting the email into the 'email_to_use' form data entry here:
$form->data['email_to_use'] = $emails[$recipient]; Then you need email_to_use in the Dynamic To box (with no quotes or brackets).Bob
Bob - just sent you a beer 🙂
Well, sorry, I still get the same error message. What would be easiest -- I can create a super admin account, or I can send you screenshots of all this.
I'd really like to get this working, it would make me look like a rock start 🙂
Well, sorry, I still get the same error message. What would be easiest -- I can create a super admin account, or I can send you screenshots of all this.
I'd really like to get this working, it would make me look like a rock start 🙂
Hi CharlieMon,
Thanks for the 'beer', much appreciated.
Please check that the action sequence is correct. The Custom Code action needs to be before the Email action.
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
Thanks for the 'beer', much appreciated.
Please check that the action sequence is correct. The Custom Code action needs to be before the Email action.
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
Thanks...PM has been sent.
Hi CharlieMon,
Seems to be working OK now. I removed all the other entries from the Dynamic Tab. Those boxes only take input names.
Bob
Seems to be working OK now. I removed all the other entries from the Dynamic Tab. Those boxes only take input names.
Bob
I'm still getting the same error:
You must provide at least one recipient email address.
You must provide at least one recipient email address.
Hi CharlieMon,
It's a bit weird. If I put my address in the Static CC box it sends OK.
Solved . . . I made a copy and switched to the Advanced Wizard. The Custom Code on-submit in the Easy Wizard runs after the Emails so putting the code there has no effect. The other Custom code box should be OK.
Bob
It's a bit weird. If I put my address in the Static CC box it sends OK.
Solved . . . I made a copy and switched to the Advanced Wizard. The Custom Code on-submit in the Easy Wizard runs after the Emails so putting the code there has no effect. The other Custom code box should be OK.
Bob
This just made my day...week.
Yep, I have tested all 3 email addresses on the new form, it all works great.
ChronoEngine rocks! I'm putting together a reward right now. Thanks again!
Yep, I have tested all 3 email addresses on the new form, it all works great.
ChronoEngine rocks! I'm putting together a reward right now. Thanks again!
The form you helped with had 2 basic fields, so now I'm going in and adding the rest of the fields for the form. It's all going fine, but where is the code that defines "em1" etc. into valid email addresses?
BTW, purchased a 3-site license today, 1 for this build site, then we'll use 1 of the others when the site goes live.
And, another beer is coming later today.
BTW, purchased a 3-site license today, 1 for this build site, then we'll use 1 of the others when the site goes live.
And, another beer is coming later today.
Hi CharlieMon,
It's in the Custom Code action, click the middle 'spanner' icon to open the configuration dialogue.
Bob
It's in the Custom Code action, click the middle 'spanner' icon to open the configuration dialogue.
Bob
Got it, thanks. I was hesitant to mess with the Wizard, as there were red warnings about resetting the form's events. Sure, enough, had to rebuild a few things, but it didn't take long.
I think we're good on this one -- thanks for all the very excellent support!
I think we're good on this one -- thanks for all the very excellent support!
This topic is locked and no more replies can be posted.
