Last active
August 29, 2015 13:56
-
-
Save mynameispj/9165042 to your computer and use it in GitHub Desktop.
Get Drupal 7 comment forms to display error messages on the original node's page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function yourmodule_form_alter(&$form, &$form_state, $form_id) { | |
if ($form_id == 'comment_node_blog_post_form') { | |
$form['actions']['submit']['#value'] = 'Add Your Comment'; | |
$form['#action'] = '?'. drupal_get_destination(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment