Is there a way to rename the "save" button when people submit content to "submit"? Or to whatever you want it?

Comments

VanD’s picture

It is totally possible but it would require you editing a Drupal core php file, which is not recommended for non-advanced users.
Also to mention, if you ever upgraded core, eg (Drupal 7.0 -> Drupal 7.2) then you would have to reapply the changes, and they may be in a different spot.

- Craig Vanderlinden @cvanderlinden

yelvington’s picture

gjangelo’s picture

buttonalter.info

; $Id$
name = ButtonAlter
description = Button Text Override
core = 6.x
package = 000 Custom Modules

buttonalter.module

<?php

function buttonalter_form_alter(&$form, $form_state, $form_id) {
	if($form_id=="apt_rental_listing_node_form") {
		$form['buttons']['submit']['#value'] = t('Submit');
		unset ($form['buttons']['preview']);
	}
	if($form_id=="res_mgr_listing_node_form") {
		$form['buttons']['submit']['#value'] = t('Submit');
		unset ($form['buttons']['preview']);
	}
}

this code changes the "save" button to "submit" and suppresses the "preview" button for these two content types -- apt_rental_listing & res_mgr_listing.

Edit: this is a drupal 6.x solution that I have used before. It may not work with D7. But maybe it will give some direction regardless.

fehin’s picture

I tried Lrr's module and it worked for me. Thanks!

pwhite’s picture

In Drupal 7 its:

$form['actions']['submit']['#value'] = t('Submit');

polishyourimage’s picture

thanks pwhite - that worked!

icf-vpathak’s picture

Worked for me. Thanks!!

joshuautley’s picture

I've tried the custom module. No dice here. In looking at other posts online I see some differences.

Your suggestion...
function yourmodule_form_alter(&$form, $form_state, $form_id) {

Other suggestion...
function yourmodule_form_alter(&$form, &$form_state, $form_id) {

And as in the MailChimp Module I'm trying to override instead of just hacking their module..
function yourmodule_form_alter($form, &$form_state, $form_id) {

And, I've also tried this variation...

$form['submit'] = array(
	'#type' => 'submit',
	'#value' => t('Subscribe'),
);

When this one didn't work...
$form['actions']['submit']['#value'] = t('Subscribe');

String overrides is not a solution because it will change everything from "Save" to "Subscribe" which would not make sense for node publishing where "Submit" is preferred.

Josh Utley, President & CEO
Intrepid Network Inc. | Multimedia Services & Business Solutions

"Our mission is to provide a more personable multimedia service along with the highest quality business solutions."