function commerce_stripe_field_widget_addressfield_standard_form_alter in Commerce Stripe 7.3
Same name and namespace in other branches
- 7 commerce_stripe.module \commerce_stripe_field_widget_addressfield_standard_form_alter()
- 7.2 commerce_stripe.module \commerce_stripe_field_widget_addressfield_standard_form_alter()
Implements hook_field_widget_WIDGET_TYPE_form_alter() for addressfield.
Set unique classes on billing address fields so that commerce_stripe.js can find them.
Parameters
$element:
$form_state:
$context:
File
- ./
commerce_stripe.module, line 1616 - This module provides Stripe (http://stripe.com/) payment gateway integration to Commerce. Commerce Stripe offers a PCI-compliant way to process payments straight from you Commerce shop.
Code
function commerce_stripe_field_widget_addressfield_standard_form_alter(&$element, &$form_state, $context) {
if ($context['field']['field_name'] === 'commerce_customer_address' && $context['instance']['bundle'] === 'billing') {
commerce_stripe_set_addressfield_class_names($element);
}
}