You are here

function commerce_bpc_commerce_bpc_submit_alter in Commerce Bulk Product Creation 7

Same name and namespace in other branches
  1. 7.2 commerce_bpc.module \commerce_bpc_commerce_bpc_submit_alter()

Implements hook_commerce_bpc_submit_alter().

File

./commerce_bpc.forms.inc, line 147
Form generation functions for the Commerce bulk product creation module

Code

function commerce_bpc_commerce_bpc_submit_alter(&$form, &$form_state) {
  if (isset($form_state['commerce_bpc']['commerce_price']['moved_fields'])) {
    foreach ($form_state['commerce_bpc']['commerce_price']['moved_fields'] as $field_name) {
      $form_state['values']['static_values'][$field_name] = $form_state['values'][$field_name];
      unset($form_state['values'][$field_name]);
    }
  }
}