You are here

public function UCXF_AddressField::edit_form_submit in Extra Fields Checkout Pane 7

Same name and namespace in other branches
  1. 6.2 class/UCXF_AddressField.class.php \UCXF_AddressField::edit_form_submit()

Override of UCXF_Field::edit_form_submit().

Submit the edit form for the item.

_state @access public

Parameters

array $form:

Return value

void

Overrides UCXF_Field::edit_form_submit

File

class/UCXF_AddressField.class.php, line 74
Contains the UCXF_AddressField class.

Class

UCXF_AddressField
Class for a Extra Fields Pane Address field

Code

public function edit_form_submit($form, &$form_state) {
  $field = $form_state['values']['ucxf'];

  // Check if user wants field in both delivery and billing pane
  // only delivery pane = 'extra_delivery'
  // only billing pane = 'extra_billing'
  // both panes = 'extra_delivery|extra_billing'
  foreach ($field['panes'] as $pane_type) {
    if ($pane_type) {
      $form_state['values']['ucxf']['pane_type'][$pane_type] = $pane_type;
    }
  }
  parent::edit_form_submit($form, $form_state);
}