I am writing small module to request availability and shipping quote on Shipping page of checkout process. I want to change text of the next button as well as where it submits. For that I need access to change "checkout_page" array. It is already available in $form_state, but it is not passed by reference as a result I can not change it easily from my custom pane module.

Proposed change in commerce/modules/checkout/includes/commerce_checkout.pages.inc:77

$form_state['checkout_page'] = $checkout_page;

to

$form_state['checkout_page'] = &$checkout_page;

Comments

rszrama’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

I don't believe this would be wise, especially given the inconsistent issues we have with form states and Drupal's Ajax system. The correct thing to do would be to use hook_form_alter() to modify the button directly on the appropriate page.