You are here

validate_cfs_preview.inc in Node and Comments Form Settings 6.2

File

commentformsettings/includes/validate_cfs_preview.inc
View source
<?php

/**
 * Validate if the Cancel link is not enabled when the comment form is below the post or comments
 */
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."));
  }
}

Functions

Namesort descending Description
_validate_cfs_preview Validate if the Cancel link is not enabled when the comment form is below the post or comments