function file_entity_test_add_form in File Entity (fieldable files) 7
Form callback; upload a file.
1 string reference to 'file_entity_test_add_form'
- file_entity_test_menu in tests/
file_entity_test.module - Implements hook_menu().
File
- 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;
}