Documentation

Reset

bool
CForm::Reset(
 int form_id,
 string check_rights = "Y"
)

The method deletes all [link= 6660053#result]results[/link] of the [link= 6660053#form]Web from[/link]. Returns true on success, false otherwise. Non-static method.

Method parameters

Parameter Description Available from version
form_id Web form ID.
check_rights Flag specifying the current user [link= 6660053#permissions]access permissions[/link] should be checked. The following values are possible:
  • Y - check access permissions;
  • N - do not check access permissions.
To delete all Web form results, the [30] Full access[link= 6660053#permissions#form]permission[/link] must be granted for the web form, specified in the form_id .

Optional parameter. Set to Y by default (access permissions must be checked).

See Also

Example of use

<?
$FORM_ID = 4;
// delete web form results  
if (CForm::Reset($FORM_ID))
{
    echo "Results of web form #4 are deleted.";
}
else
{
    // print error description
    global $strError;
    echo $strError;
}
?>


© «Bitrix24», 2001-2024
Up