bool CFormField::Delete( int field_id, string check_rights = "Y" )
The method Delete deletes a question or a field and all its answers. Returns true on success, or false otherwise.
Parameter | Description |
---|---|
field_id | The ID of the question or the field. |
check_rights | Flag specifying the current user permissions
should be checked. One of the following values is possible:
Optional. "Y" by default which means the permissions should be checked. |
<? $FIELD_ID = 140; // delete the question #140 if (CFormField::Delete($FIELD_ID)) { echo "The question #140 has been deleted."; } else { // display the error description global $strError; echo $strError; } ?>
© 2001-2005 Bitrix | Bitrix Site Manager |