You are here

function commerce_customer_ui_form_alter in Commerce Core 7

Implements hook_form_alter().

File

modules/customer/commerce_customer_ui.module, line 275

Code

function commerce_customer_ui_form_alter(&$form, &$form_state, $form_id) {

  // On field administration forms for customer profile types add a breadcrumb.
  if (in_array($form_id, array(
    'field_ui_field_overview_form',
    'field_ui_display_overview_form',
  ))) {
    if ($form['#entity_type'] == 'commerce_customer_profile') {

      // Load the customer profile type being modified for this form.
      $profile_type = commerce_customer_profile_type_load($form['#bundle']);
      drupal_set_title($profile_type['name']);
    }
  }
}