Delete
bool CFormAnswer::Delete( int answer_id, int question_id = false, )
The method Delete deletes an answer and all result values bound to it. Returns true on success, or false otherwise.
Parameters
Parameter | Description |
---|---|
answer_id | The answer ID to be deleted. |
question_id | The question ID to which the deleted answer is bound. If specified, the parameter will speed up the method execution. Optional parameter. False by default. |
See Also
- [link=90289]CForm::Delete[/link]
- [link=90330]CFormField::Delete[/link]
- [link=90382]CFormStatus::Delete[/link]
- [link=90366]CFormResult::Delete[/link]
Example
<? $answer_id = 589; // The answer ID // delete the answer if (CFormAnswer::Delete($answer_id)) { echo "The answer #589 is deleted."; } else { // display the error description global $strError; echo $strError; } ?>
© «Bitrix24», 2001-2024