It takes just a little bit of code added to your theme's functions.php
http://pastebin.com/xGaKYPAH
I looked at your page and I think you are using form 2 so this code should be correct. If you want to use this for a different form, change the "_2" in line 3 to your form ID. If you wanted to apply this code to form 17, line 3 would look like this:
[php]
add_action('gform_pre_submission_filter_17', 'set_from_email');
The other thing you need to change is line 6 to the actual field in your form that contains the value of the email address. I noticed you used radio buttons for the technician names. I looked at your form and I believe input_19 is correct for the technician name. Be sure you enable values and then insert the email address for each tech as the value. That will properly work with the code in line 6 here.
[php]
$techemail = rgpost('input_19');
You will need to set up your admin and customer notifications in the form builder. The one thing that will be overridden in two places is the "from" email. You'll need to enter something there, but it does not matter since we will override it with this function.
You can submit the form here and you will receive a copy of the customer notification and see that it comes "from" the email address of the technician who submitted the form.
http://gravity.chrishajer.com/record-of-technician-service/
Password is greenprint
If you have any questions, please let us know.
Posted 13 years ago on Tuesday September 13, 2011 |
Permalink