diff --git a/selectize.module b/selectize.module index 548da16..7730bd7 100644 --- a/selectize.module +++ b/selectize.module @@ -202,11 +202,7 @@ function selectize_field_widget_form_alter(&$element, &$form_state, $context) { $fieldname = $context['instance']['field_name']; $language = $context['langcode']; - $element['#attached']['js'][] = libraries_get_path('selectize') . '/dist/js/standalone/selectize.min.js'; - $element['#attached']['js'][] = drupal_get_path('module', 'selectize') . '/js/selectize.drupal.js'; - - $element['#attached']['css'][] = libraries_get_path('selectize') . '/dist/css/selectize.default.css'; - $element['#attached']['css'][] = drupal_get_path('module', 'selectize') . '/css/selectize.drupal.css'; + selectize($element); // For remote implementation on autocomplete path if (!empty($element['#autocomplete_path'])) {