Discussions

Buttons "Continue" or "Go back"

i would like to have them in different order, first "go back" then "or" then "continue". Anybody can help?

Posted: Feb 8, 2012

Comments

mwisner on February 10, 2012

The only way I could figure out how to do this was to use hook_form_alter in a custom module. Here is an example that will move the Continue button to the right and remove the word "or".

<?php
/**
 * Implementation of hook_form_alter().
 */
function MYMODULE_form_alter(&$form, &$form_state, $form_id) {
 switch (
$form_id) {
   case
'commerce_checkout_form_checkout':
   case
'commerce_checkout_form_review':
    
$form['buttons']['continue']['#weight'] = 8;
    
$form['buttons']['back']['#prefix'] = '';
     break;
  }
}
?>