You are here

function payment_form_process_line_item_submit_ajax_callback in Payment 7

Implements form AJAX callback for payment_line_item elements.

1 string reference to 'payment_form_process_line_item_submit_ajax_callback'
payment_form_process_line_item in ./payment.ui.inc
Implements form process callback for a payment_line_item element.

File

./payment.ui.inc, line 886
The Payment user interface.

Code

function payment_form_process_line_item_submit_ajax_callback(array $form, array &$form_state) {
  $items_parents = array_slice($form_state['triggering_element']['#array_parents'], 0, -1);
  $element = drupal_array_get_nested_value($form, $items_parents);
  $container_key = 'container_' . ($form_state['payment_line_item_count'] - 1);
  return array(
    $container_key => $element[$container_key],
    'add_more' => $element['add_more'],
  );
}