You are here

function file_module_test_form_submit in Drupal 7

Form submission handler for file_module_test_form().

File

modules/file/tests/file_module_test.module, line 61
Provides File module pages for testing purposes.

Code

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