diff --git a/autocomplete_widgets.module b/autocomplete_widgets.module index a9c196d..272a062 100755 --- a/autocomplete_widgets.module +++ b/autocomplete_widgets.module @@ -44,29 +44,29 @@ function autocomplete_widgets_views_api() { function autocomplete_widgets_field_widget_info() { return array( 'autocomplete_widgets_allowvals' => array( - 'label' => t('Autocomplete for allowed values list'), + 'label' => t('Autocomplete for allowed values list'), 'field types' => array('list_text', 'list_integer', 'list_decimal', 'list_float'), 'settings' => array( - 'size' => 60, - 'autocomplete_match' => 'contains', + 'size' => 60, + 'autocomplete_match' => 'contains', 'autocomplete_case' => 1, ), ), 'autocomplete_widgets_flddata' => array( - 'label' => t('Autocomplete for existing field data'), + 'label' => t('Autocomplete for existing field data'), 'field types' => array('text'), 'settings' => array( - 'size' => 60, - 'autocomplete_match' => 'contains', + 'size' => 60, + 'autocomplete_match' => 'contains', 'autocomplete_case' => 1, ), ), 'autocomplete_widgets_suggested' => array( - 'label' => t('Autocomplete for predefined suggestions'), + 'label' => t('Autocomplete for predefined suggestions'), 'field types' => array('text'), 'settings' => array( - 'size' => 60, - 'autocomplete_match' => 'contains', + 'size' => 60, + 'autocomplete_match' => 'contains', 'autocomplete_case' => 1, ), ), @@ -115,8 +115,9 @@ function autocomplete_widgets_field_widget_form(&$form, &$form_state, $field, $i '#delta' => $delta, '#title' => $element['#title'], '#size' => $instance['widget']['settings']['size'], + '#maxlength' => $field['settings']['max_length'], ); - + switch($instance['widget']['type']) { case 'autocomplete_widgets_flddata': case 'autocomplete_widgets_suggested':