You are here

function ml_dummy_form in Media Library 6

Form for modal dialog For updating media, use the contents of $form_state['update']

1 string reference to 'ml_dummy_form'
ml_dummy_media_forms in ml_dummy/ml_dummy.module
Implementation of hook_media_forms()

File

ml_dummy/ml_dummy.module, line 73
Media Library Dummy module.

Code

function ml_dummy_form(&$form, &$form_state) {

  // Check for default value from content being updated
  if (isset($form_state['update'])) {
    $dummy = $form_state['update']['dummy'];
  }
  else {
    $dummy = '';
  }
  $form['dummy_field'] = array(
    '#type' => 'textfield',
    '#title' => t('Dummy Text Field'),
    '#description' => t('Just another dummy field for example'),
    '#size' => 40,
    '#maxlength' => 255,
    '#default_value' => $dummy,
  );
  $form_state['no buttons'] = TRUE;
}