You are here

function phonefield_field_widget_form in Phone Field 7

Implements hook_field_widget_form().

File

./phonefield.module, line 214
Hooks for a module that defines a simple phone number field type.

Code

function phonefield_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  $element += array(
    '#type' => $instance['widget']['type'],
    '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
    '#attached' => array(
      'css' => array(
        drupal_get_path('module', 'phonefield') . '/phonefield.css',
      ),
    ),
  );
  return $element;
}