Thanks Carl. This works:
//GForm autoresponder hook
add_filter("gform_autoresponder_email", "change_notification_email", 10, 2);
function change_notification_email($email, $form) {
$a = $_POST["input_33"];
$b = $_POST["input_39"];
$c = $_POST["input_45"];
$d = $_POST["input_52"];
$e = $_POST["input_58"];
$value1 = $a;
$value2 = $a . "," . $b;
$value3 = $a . "," . $b . "," . $c;
$value4 = $a . "," . $b . "," .$c . "," . $d;
$value5 = $a . "," . $b . "," .$c . "," . $d . "," . $e;
if (($a != "") && ($b != "") && ($c != "") && ($d != "") && ($e != "")) {
return $value5;
} elseif (($a != "") && ($b != "") && ($c != "") && ($d != "")) {
return $value4;
} elseif (($a != "") && ($b != "") && ($c != "")) {
return $value3;
} elseif (($a != "") && ($b != "")) {
return $value2;
} elseif ($a != "") {
return $value1;
} else {
return $email;
}
}
But realized it was completely irrelevant because I had the wrong ID in one of the {Email:ID}
fields...which by the way, will kill anything following that field. So if in the BCC: field you had {Email:1},{Email:2},{Email:3}
and ID_2 was incorrect for some reason, then ID_3 wouldn't be sent to. Just an FYI. Thanks guys.
Posted 13 years ago on Tuesday February 22, 2011 |
Permalink