Reset
bool CFormField::Reset( int field_id, string check_rights = "Y" )
The method Reset deletes all answers of the specified question or fields results. Returns true on success, or false otherwise.
Parameters
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. |
See Also
Example
<? $FIELD_ID = 4; // delete all answers of the question with ID=140 from results if (CFormField::Reset($FIELD_ID)) { echo "Deletion OK."; } else { // display the error description global $strError; echo $strError; } ?>
© «Bitrix24», 2001-2024