Documentation

Delete

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

The method deletes [link= 6660053#form]web form[/link] with all its [link= 6660053#result]results[/link]. Returns true on success, otherwise returns false. Non-static method.

Method parameters

Parameter Description Available from version
form_id Web form ID.
check_rights Flag specifying the requirement to check current user access permissions. The following values are possible:
  • Y - check access permissions;
  • N - do not check access permissions.
To delete web form, [W] Full access to the "Web forms" module is required.
Optional parameter. By default - "Y" (access permissions must be checked).

See Also

Examples of use

<?
$FORM_ID = 4;
// delete web form
if (CForm::Delete($FORM_ID))
{
    echo "Web form#4 is deleted.";
}
else
{
    // print error descriptions
    global $strError;
    echo $strError;
}
?>


© «Bitrix24», 2001-2024
Up