You are here

function file_entity_test_add_form in D7 Media 7

Form callback; upload a file.

1 string reference to 'file_entity_test_add_form'
file_entity_test_menu in file_entity/tests/file_entity_test.module
Implements hook_menu().

File

file_entity/tests/file_entity_test.pages.inc, line 11
Test pages for the File Entity Test module.

Code

function file_entity_test_add_form($form, &$form_state) {
  $form['file'] = array(
    '#type' => 'managed_file',
    '#required' => TRUE,
    '#title' => 'File',
    '#upload_location' => 'public://',
  );
  $form['actions'] = array(
    '#type' => 'actions',
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}