You are here

function isbn_field_widget_form in ISBN Field 7

Implements hook_field_widget_form().

File

./isbn.module, line 130
Maintains a consistant relationship between nodes and ISBNs.

Code

function isbn_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $base) {
  $element = $base;
  $element['isbn'] = $base + array(
    '#type' => 'textfield',
    '#default_value' => isset($items[$delta]['isbn']) ? $items[$delta]['isbn'] : NULL,
    '#size' => $instance['widget']['settings']['size'],
    '#prefix' => '<div class="text-full-wrapper">',
    '#suffix' => '</div>',
  );
  return $element;
}