Drupal - How to change node save button text?

you could use string overrides module or use hook:

function yourmodule_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'name_of_form') {
    $form['actions']['submit']['#value'] = 'Your button text';
  }
}

Here is an example: I have created a module called change_form_values and the form ID of my content type is content_type_test_node_form:

this work for me in Drupal 7:

function change_form_values_form_alter(&$form, &$form_state, $form_id) {
    //dsm($form_id); // to see form ID
    if ($form_id == "content_type_test_node_form") {
    $form['actions']['submit']['#value'] = 'New button text';
    }
}

this work for me in Drupal 6:

function change_form_values_form_alter(&$form, &$form_state, $form_id) {
    //dsm($form['form_id']['#id']);
    if ($form_id == "content_type_test_node_form") {
    $form['buttons']['submit']['#value'] = 'New button text';
    }
}

I hope information be useful.

Tags:

Forms

Nodes

7