Documentation

Reset

bool
CFormResult::Reset(
 int result_id,
 bool del_files = true,
 string del_fields = "N",
 array exception = array()
)

The function deletes all values of answers to the web form questions, as well as values of the web form fields for the specified result. The result itself is not changed. If no errors occurred during the handling, the method returns true. Non-static method.

Method parameters

Parameter Description
result_id ID of the result.
del_files If set to "Y", the files, uploaded as the value of the answer to question are to be deleted.
Optional parameter. By default value is true (delete the files).
del_fields If set to "Y", the values of the web form fields are to be deleted.
Optional parameter. Set to "N" by default (the values of fields must be deleted).
exception Array of question IDs and the web form fields, which values are not to be deleted.
Optional parameter. Empty array by default.

See Also

Examples of use

<?
$RESULT_ID = 189; // result ID

// delete all values for answers to questions and web form fields 
// jointly with files
// excluding the questions with ID = 140 and ID = 141
CFormResult::Reset($RESULT_ID, true, "Y", array(140, 141));
?>


© «Bitrix24», 2001-2024
Up