You are here

function uc_address_field_required in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_store/uc_store.module \uc_address_field_required()
  2. 7.3 uc_store/uc_store.module \uc_address_field_required()

Return TRUE if a field is required.

2 calls to uc_address_field_required()
uc_checkout_pane_billing in uc_cart/uc_cart_checkout_pane.inc
Get the billing information.
uc_checkout_pane_delivery in uc_cart/uc_cart_checkout_pane.inc
Get the delivery information.

File

uc_store/uc_store.module, line 2159
Contains global Ubercart functions and store administration functionality.

Code

function uc_address_field_required($field) {
  $fields = variable_get('uc_address_fields_required', drupal_map_assoc(array(
    'first_name',
    'last_name',
    'street1',
    'city',
    'zone',
    'postal_code',
    'country',
  )));
  if (!isset($fields[$field])) {
    return FALSE;
  }
  else {
    return TRUE;
  }
}