By johnlinux on
Hi,
I created my first module today and like magic, the code below changes the value of the save button on a comment form to Add. How can I change it to change the value of the "Add New Comment" to a SPECIFIC content type to something else.
// $Id$
function ModuleName_form_alter(&$form, $form_state, $form_id) {
if($form_id == 'comment_form') {
$form['submit']['#value'] = 'Add';
}
}
Thanks in advance
Comments
Load the node from
Load the node from $form['nid'] and check the $node->type.
Lead Developer and Founder of StreamRiot.com
_
'add new comment' appears on the viewed node-- i think you want http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...