You are here

function cmis_field_widget in CMIS API 6.3

Same name and namespace in other branches
  1. 6.4 cmis_field/cmis_field.module \cmis_field_widget()

Implementation of hook_widget()

Parameters

$form - form array:

$form_state - form state array:

$field - field array:

$items - field values:

$delta - id of the field (if there is more than one in the form):

Return value

form element array

File

cmis_field/cmis_field.module, line 147

Code

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