function _validate_cfs_comment_cancel in Node and Comments Form Settings 7.2
Same name and namespace in other branches
- 6.3 commentformsettings/includes/validate_cfs_comment_cancel.inc \_validate_cfs_comment_cancel()
- 6.2 commentformsettings/includes/validate_cfs_comment_cancel.inc \_validate_cfs_comment_cancel()
- 7.3 commentformsettings/includes/validate_cfs_comment_cancel.inc \_validate_cfs_comment_cancel()
@file Validate if the Cancel link is not enabled when the comment form is below the post or comments.
File
- commentformsettings/
includes/ validate_cfs_comment_cancel.inc, line 7 - Validate if the Cancel link is not enabled when the comment form is below the post or comments.
Code
function _validate_cfs_comment_cancel($form, &$form_state) {
if ($form_state['values']['cfs_comment_cancel'] == 0 && $form_state['values']['comment_form_location']) {
form_set_error('cfs_comment_cancel', t("You can't Enable the Comment Cancel Button while you display the comment submission form below post or comments. Please change one or the other."));
}
}