You are here

function autocomplete_deluxe_field_widget_settings_form in Autocomplete Deluxe 7

Same name and namespace in other branches
  1. 7.2 autocomplete_deluxe.module \autocomplete_deluxe_field_widget_settings_form()

Implements hook_field_widget_settings_form().

File

./autocomplete_deluxe.module, line 120
Define enhanced autocomplete wdiget.

Code

function autocomplete_deluxe_field_widget_settings_form($field, $instance) {
  $widget = $instance['widget'];
  $settings = $widget['settings'];
  $type = str_replace('autocomplete_deluxe_', '', $widget['type']);
  $form['size'] = array(
    '#type' => 'textfield',
    '#title' => t('Size of textfield'),
    '#default_value' => isset($settings['size']) ? $settings['size'] : 6,
    '#element_validate' => array(
      '_element_validate_integer_positive',
    ),
    '#required' => TRUE,
  );
  return $form;
}