Hi all...here is a snippet I have that is used in the &emailTo value for a form:
$location = $_POST['location'];
$modx->log(modX::LOG_LEVEL_ERROR, 'location: '.$location);
$output = "";
if ($location=='LOCATION1') {
$output = '[email protected]';
} else if ($location=='LOCATION2'){
$output = '[email protected]';
} else {
$output = '[email protected]';
}
return $output;
The logic of the form works, e.g. if LOCATION2 is chosen in the form, email2 will get an email. But here's the weird thing. I wanted to output the location in the log...so I did just that...except its blank. All that shows up in the log is "location: ". How is this possible?