|
function BeforeAdd(&$values)
{
//Parameters:
//$values - Array object.
//Each field on
the Add form is represented as a 'Field name'-'Field value' pair
//********** Send
email with new data ************
$email = "test@test.com";
$message = "";
$subject =
"New data record";
foreach($values
as $field=>$value)
$message.= $field."
: ".$value."\r\n";
mail($email,
$subject, $message);
return true;
//return true if
you would like to proceed with adding the new record;
//return false otherwise
} |