You are here

function _validate_cfs_preview in Node and Comments Form Settings 6.3

Same name and namespace in other branches
  1. 6.2 commentformsettings/includes/validate_cfs_preview.inc \_validate_cfs_preview()
  2. 7.3 commentformsettings/includes/validate_cfs_preview.inc \_validate_cfs_preview()
  3. 7.2 commentformsettings/includes/validate_cfs_preview.inc \_validate_cfs_preview()

Validate if the Cancel link is not enabled when the comment form is below the post or comments

File

commentformsettings/includes/validate_cfs_preview.inc, line 6

Code

function _validate_cfs_preview($form, &$form_state) {
  if ($form_state['values']['cfs_preview'] == 1 && $form_state['values']['comment_preview'] == 1) {
    form_set_error('cfs_preview', t("You're trying to hide the <em>preview button in comments</em> but the button is set to be <em>Required</em>, please change one or the other."));
  }
}