You are here

function commerce_stripe_field_widget_addressfield_standard_form_alter in Commerce Stripe 7.2

Same name and namespace in other branches
  1. 7.3 commerce_stripe.module \commerce_stripe_field_widget_addressfield_standard_form_alter()
  2. 7 commerce_stripe.module \commerce_stripe_field_widget_addressfield_standard_form_alter()

implements hook_field_widget_WIDGET_TYPE_form_alter

set unique classes on address input fields to guarantee commerce_stripe.js can find them

Parameters

$element:

$form_state:

$context:

File

./commerce_stripe.module, line 600
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') {
    return;
  }
  commerce_stripe_set_addressfield_class_names($element);
}