function file_entity_add_upload_step_fields

cis7 file_entity.pages.inc file_entity_add_upload_step_fields($form, &$form_state, array $options = array())
cle7 file_entity.pages.inc file_entity_add_upload_step_fields($form, &$form_state, array $options = array())
elmsmedia7 file_entity.pages.inc file_entity_add_upload_step_fields($form, &$form_state, array $options = array())
icor7 file_entity.pages.inc file_entity_add_upload_step_fields($form, &$form_state, array $options = array())
meedjum_blog7 file_entity.pages.inc file_entity_add_upload_step_fields($form, &$form_state, array $options = array())
mooc7 file_entity.pages.inc file_entity_add_upload_step_fields($form, &$form_state, array $options = array())

Generate form fields for the fourth step in the add file wizard.

1 call to file_entity_add_upload_step_fields()
file_entity_add_upload in sites/all/modules/ulmus/file_entity/file_entity.pages.inc
Form callback for adding a file via an upload form.

File

sites/all/modules/ulmus/file_entity/file_entity.pages.inc, line 179
Supports file operations including View, Edit, and Delete.

Code

function file_entity_add_upload_step_fields($form, &$form_state, array $options = array()) {
  // Load the file and overwrite the filetype set on the previous screen.
  $file = file_load($form_state['storage']['upload']);
  $file->type = $form_state['storage']['type'];

  // Let users modify the filename here.
  $form['filename'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#default_value' => $file->filename,
    '#required' => TRUE,
    '#maxlength' => 255,
    '#weight' => -10,
  );

  // Add fields.
  field_attach_form('file', $file, $form, $form_state);

  $form['actions'] = array('#type' => 'actions');
  $form['actions']['previous'] = array(
    '#type' => 'submit',
    '#value' => t('Previous'),
    '#limit_validation_errors' => array(),
    '#submit' => array('file_entity_add_upload_submit'),
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );

  return $form;
}