Skip to content

Instantly share code, notes, and snippets.

@chered
Created November 5, 2014 15:18
Show Gist options
  • Save chered/b8cfb1713d2f83cc1e43 to your computer and use it in GitHub Desktop.
Save chered/b8cfb1713d2f83cc1e43 to your computer and use it in GitHub Desktop.
override user login and checkout buttons on template.php
function power_form_alter(&$form, &$form_state, $form_id) {
/*
* Show all variables in user login
* dpm($form);
*/
if ($form_id == 'user_login') {
$form['pass']['#title'] = t('Customer No.');
$form['pass']['#description'] = t(' ');
$form['name']['#description'] = t(' ');
}
if ($form_id == 'commerce_checkout_form_checkout') {
$form['buttons']['continue']['#value'] = t('Complete Order');
$form['buttons']['cancel']['#value'] = t('Cancel Order');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment