function ctools_form_comment_form_alter in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 ctools.module \ctools_form_comment_form_alter()
Alter the comment form to get a little more control over it.
File
- plugins/
content_types/ node_context/ node_comment_form.inc, line 76
Code
function ctools_form_comment_form_alter(&$form, &$form_state) {
if (!empty($form_state['ctools comment alter'])) {
// Force the form to post back to wherever we are.
$form['#action'] = url($_GET['q'], array(
'fragment' => 'comment-form',
));
if (empty($form['#submit'])) {
$form['#submit'] = array(
'comment_form_submit',
);
}
$form['#submit'][] = 'ctools_node_comment_form_submit';
}
}