Hey,
I am using ChronoFormsV4.
I am using the code where you HIDE a recipients email while letting a person choose from a list of people to send to.
Learning V4 - it's been cool. But a little slow (no one has ever mistaken me for a programmer)
In the FORM WIZARD:
1 - I have a "Custom Element"
2 - In that "Custom Element" I have this:
3 - In the ONSUBMIT ACTIONS - I have a "Custom Code" action that says this:
4 - Under the EMAIL ACTION (Dynamic To) I have this:
But it's not working. Any thoughts? Thanks!
I am using ChronoFormsV4.
I am using the code where you HIDE a recipients email while letting a person choose from a list of people to send to.
Learning V4 - it's been cool. But a little slow (no one has ever mistaken me for a programmer)
In the FORM WIZARD:
1 - I have a "Custom Element"
2 - In that "Custom Element" I have this:
<select name="recipients">
<option value="Tom1">Tom 1</option>
<option value="TAG2">Tag 2</option>
<option value="Thomas3">Thomas 3</option>
</select>
3 - In the ONSUBMIT ACTIONS - I have a "Custom Code" action that says this:
<?php
$recipient = JRequest::getString('recipients', '', 'post');
$emails = array (
'Tom1' => 'me@domain1.com',
'TAG2' => 'me@domain2.com',
'Thomas3' => 'me@domain3.com',
);
$email_to_use = $emails[$recipient];
JRequest::setVar('email_to_use', $email_to_use);
?>
4 - Under the EMAIL ACTION (Dynamic To) I have this:
email_to_use
But it's not working. Any thoughts? Thanks!