function file_module_test_form_submit

Form submission handler for file_module_test_form().

File

modules/file/tests/file_module_test.module, line 61

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,
    )));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.