You are here

function media_module_test_form_submit in D7 Media 7.2

Same name and namespace in other branches
  1. 7.4 tests/media_module_test.module \media_module_test_form_submit()
  2. 7.3 tests/media_module_test.module \media_module_test_form_submit()

Form submission handler for media_module_test_form().

File

tests/media_module_test.module, line 98
Provides Media module pages for testing purposes.

Code

function media_module_test_form_submit($form, &$form_state) {
  if ($form['#tree']) {
    $fid = $form['nested']['media']['#extended'] ? $form_state['values']['nested']['media']['fid'] : $form_state['values']['nested']['media'];
  }
  else {
    $fid = $form['nested']['media']['#extended'] ? $form_state['values']['media']['fid'] : $form_state['values']['media'];
  }
  drupal_set_message(t('The file id is %fid.', array(
    '%fid' => $fid,
  )));
}