AddEventHandler('form', 'onAfterResultAdd', 'my_onAfterResultAddUpdate');
function my_onAfterResultAddUpdate($WEB_FORM_ID, $RESULT_ID)
{$fid = CFile::SaveFile($_FILES['file'], 'file');
$file_array = array();
$file_path = '';
if (intval($fid) > 0) {
$file_path = CFile::GetPath($fid);
$file_array[] = $fid;
}
if ($WEB_FORM_ID == 1){
CEvent::Send("FORM_FILLING_SIMPLE_FORM_1", "s1", $arFields, "", "", $file_array);
}
}