You are here

function currency_form_submit in Currency 7

Same name and namespace in other branches
  1. 5 currency.module \currency_form_submit()
  2. 6 currency.module \currency_form_submit()

Submit handler for the currency exchange form.

File

./currency.module, line 160
This module provides currency exchange rates.

Code

function currency_form_submit($form, &$form_state) {

  // Save the last used values in the session.
  $_SESSION['currency_amount'] = $form_state['values']['currency_amount'];
  $_SESSION['currency_from'] = $form_state['values']['currency_from'];
  $_SESSION['currency_to'] = $form_state['values']['currency_to'];

  // Rebuild the form.
  $form_state['rebuild'] = TRUE;

  // Store submitted values.
  $form_state['storage']['currency_amount'] = $form_state['values']['currency_amount'];
  $form_state['storage']['currency_from'] = $form_state['values']['currency_from'];
  $form_state['storage']['currency_to'] = $form_state['values']['currency_to'];
}