Hi
I have a form which has a drop down for 4 different departments. The departments have different email addresses. Basicsally depending on the selection, I need the emails to go to a specific address?
I did find this http://www.chronoengine.com/faqs/52-cfv4/cfv4-emails/2603-how-can-i-send-an-email-to-different-addresses.html but it appears to be for radio buttons and I am not sure how to set this up and get it working.
Dave 8)
I have a form which has a drop down for 4 different departments. The departments have different email addresses. Basicsally depending on the selection, I need the emails to go to a specific address?
I did find this http://www.chronoengine.com/faqs/52-cfv4/cfv4-emails/2603-how-can-i-send-an-email-to-different-addresses.html but it appears to be for radio buttons and I am not sure how to set this up and get it working.
Dave 8)
I have now managed to get this working however, 2 further isssues have arisen.
1. The department name does not show on the received email.
2 I am getting validation errors on the page.
The received email looks like this
Your Email: info@****.co.uk
Your Name: dave
What Is Your Enquiry? test 7
Department
Dave 8)
1. The department name does not show on the received email.
2 I am getting validation errors on the page.
Array
(
[chronoform] => Contactlowestoft-Copy
[event] => submit
[email_address] => info@****.co.uk
[your_name] => dave
[your_enquiry] => test 7
[recipients] => Support Enquiries
[send_enquiry] => Send Your Enquiry
[09724474aa29a3afe609d4589c43ec84] => 1
[email_to_use] => user@hotmail.com
)
Validation Errors:
Array
(
)
The received email looks like this
Your Email: info@****.co.uk
Your Name: dave
What Is Your Enquiry? test 7
Department
Dave 8)
Hi Dave,
The form results from a drop down and radio buttons are identical. Try the FAQ as it is and it should work OK.
Bob
The form results from a drop down and radio buttons are identical. Try the FAQ as it is and it should work OK.
Bob
Hi Bob
I did make a small change, ie email addresses the code I used is here
I a get another error at the bottom of the form
This has not been set in the form so I have no idea why this should be happening
Dave
I did make a small change, ie email addresses the code I used is here
<?php
$recipient = JRequest::getString('recipients', 'General Enquiries', 'post');
$emails = array (
'Please Select'=>'Please Select',
'General Enquiries' => 'user1@hotmail.com',
'Product Enquiries' => 'user2@hotmail.com',
'Support Enquiries' => 'user3@hotmail.com',
'Account Enquiries' => 'user4@hotmail.com' );
$form->data['email_to_use'] = $emails[$recipient];
?>
I a get another error at the bottom of the form
array ( )
redirect_user
Error: No Redirect URL found
This has not been set in the form so I have no idea why this should be happening
Dave
Well I have tried to set the form using the same info as the FAQ and still without success. I would really appreciate some help with this???
It would be nice to know exactly what settings are required and where!
Dave 8)
It would be nice to know exactly what settings are required and where!
Dave 8)
Hi davec,
I'm no longer clear what the problem is?
The email_to_use address is being set OK (looking at an earlier post).
To put the department name in the email add {recipients} - just like any other input.
The Validation Errors is created by the Debugger, it's an empty array so there are no errors.
Bob
I'm no longer clear what the problem is?
The email_to_use address is being set OK (looking at an earlier post).
To put the department name in the email add {recipients} - just like any other input.
The Validation Errors is created by the Debugger, it's an empty array so there are no errors.
Bob
This topic is locked and no more replies can be posted.