1

I would like to set custom default values for both the Customer Shipping and Billing forms. I built a custom page/pane that occurs at the beginning of the Commerce Checkout process. This page/pane has 5 fields that pull basic user information before depositing the user at the 'express' checkout form (part 2 in the multi-step form -- or better known as the typical Shipping/Billing forms). My objective is to be able to use the data saved in $form_state['order']->data; in order to pass it into the default_values in certain textfields within the Shipping/Billing forms.

Using hook_form_alter does nothing to modify the Shipping/Billing in either $form_state or $form. There doesn't appear to be a declaration of default_value within the forms. Even if I do declare a value/values, it does not show up on the page. Any ideas?

0

The trick is to use

function hook_field_widget_addressfield_standard_form_alter(&$element, &$form_state, &$context) { }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.