You are here

function emfield_field_widget_form in Embedded Media Field 7

Implements hook_field_widget_form().

File

./emfield.module, line 48

Code

function emfield_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  $element += array(
    '#type' => 'textfield',
    '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
    '#size' => $instance['widget']['settings']['size'],
    '#maxlength' => 1024,
    '#element_validate' => array(
      'emfield_widget_validate',
    ),
    '#value_callback' => 'emfield_widget_value',
  );
  return array(
    'fid' => $element,
    'display' => array(
      '#type' => 'value',
      '#value' => 1,
    ),
  );
}