function simplify_form_comment_form_alter in Simplify 7.3
Same name and namespace in other branches
- 8 simplify.module \simplify_form_comment_form_alter()
Implements hook_form_BASE_FORM_ID_alter() for comment_form.
File
- ./
simplify.module, line 369 - Simplifies the user interface by hiding particular fields.
Code
function simplify_form_comment_form_alter(&$form, &$form_state, $form_id) {
$node = $form['#node'];
// Get array of fields to hide
$global_fields = variable_get('simplify_comments_global', array());
$type_fields = variable_get('simplify_comments_' . $node->type, array());
$fields = array_merge($global_fields, $type_fields);
// Hide fields
simplify_hide_fields($fields, $form);
}