The following lines in selectize_form_alter() completely remove any javascript or css files associated with the form:

if ($apply_selectize) {
    $form['#attached']['js'] = array(
      libraries_get_path('selectize') . '/dist/js/standalone/selectize.min.js',
      drupal_get_path('module', 'selectize') . '/js/selectize.drupal.js',
    );

    $form['#attached']['css'] = array(
      libraries_get_path('selectize') . '/dist/css/selectize.default.css',
      drupal_get_path('module', 'selectize') . '/css/selectize.drupal.css'
    );
  }

The attached patch extends the #attached property instead of overwriting it.

Thanks for creating this module!

CommentFileSizeAuthor
selectize-leave-existing-assets.patch1.11 KBfloretan

Comments

kevinquillen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.