Hi guys,
I asked about conditional routing before here; http://www.gravityhelp.com/forums/topic/conditional-routing
I've since purchased the form and basically I have a selection of checkboxes (over 30 in total) and I am trying to get this code to work with just 3 checkboxes for now.
add_filter("gform_pre_submission_filter", "add_bcc");
function add_bcc($form){
//creating list of emails based on fields on the form
$bcc = $_POST["input_31.1"] . "storea1@domain.com,storea2@domain.com"; //Store A
$bcc .= $_POST["input_31.9"] . "storeb1@domain.com,storeb2@domain.com"; //Store B
$bcc .= $_POST["input_31.15"] . "storea3@domain.com,storec1@domain.com"; //Store C
//setting notification BCC field to the list of fields
$form["notification"]["bcc"] = $bcc;
//returning modified form object
return $form;
}
So basically I want if some picks Store A & Store B from the checkboxes the notification goes to storea1@domain.com, storea2@domain.com, storeb1@domain.com, and storeb2@domain.com.
Alternatively if someone only picks Store A it'll go to storea1@domain.com and storea2@domain.com
Right now it's going to all 6 email address regardless of selection plus the email specified in the admin area. Can you help please?
Thanks!