You are here

function barcode_widget in Barcode 6

Same name and namespace in other branches
  1. 6.2 barcodefield.module \barcode_widget()

Implementation of hook_widget().

File

./barcode.module, line 203

Code

function barcode_widget(&$form, &$form_state, $field, $items, $delta = 0) {
  $element = array(
    '#type' => $field['widget']['type'],
    '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
  );
  return $element;
}