You are here

function uc_extra_fields_pane_weight_uc_store_address_fields_submit in Extra Fields Checkout Pane 6.2

uc_extra_fields_pane_weight_uc_store_address_fields_submit() Saves the weight settings for the address fields

_state

Parameters

array $form:

Return value

void

See also

_uc_extra_fields_pane_weight_uc_store_address_fields_alter()

1 string reference to 'uc_extra_fields_pane_weight_uc_store_address_fields_submit'
_uc_extra_fields_pane_weight_uc_store_address_fields_alter in includes/weights.inc
_uc_extra_fields_pane_weight_uc_store_address_fields_alter() Adds option to order address fields by adding a weight field

File

includes/weights.inc, line 81
These functions adds weight to the address fields, so it becomes possible to change the order of the address fields.

Code

function uc_extra_fields_pane_weight_uc_store_address_fields_submit($form, $form_state) {
  $weights = array();
  foreach ($form_state['values']['fields'] as $fieldname => $fieldsettings) {
    $weights[$fieldname] = $fieldsettings['weight'];
  }
  variable_set('uc_address_fields_weight', $weights);
}