I have this function to add libraries from jQuery UI, but the selectmen, and tooltip seems to be missing! anyone know how to import them in Drupal 7.4?

function kalender_init() {
    $lib= array(
        'drupal.ajax', 'drupal.form', 
        'jquery', 'ui','ui.selectable',
        'ui.button', 'ui.buttonset',
        'ui.selectmenu', 'ui.tooltip',
    foreach($lib as $l){
        drupal_add_library('system', $l);

I need for the form over here:

foreach($result as $color){
    array_push($colors, $color->name);
foreach($colors as $color => $id){
    array_push($attr, array('class' => array('colors-list'), 'data-color' => $color) );
$form['gruppen']['checkbox'][$group->id]['color'] = array(
    '#type' => 'select',
    '#suffix' => '<div class="clear-both"></div></div>',
    '#default_value' => 0,
    '#options' => $colors,
    '#options_attributes' => $attr,
  • You can check the list of core jQuery UI library from system_library() in system.module – Jimmy Ko Jul 2 '16 at 23:51
  • Where? how? I see in the folder misc/ui/ that there is no tooltip and no selectmenu, you are able to display structured information about librarys?? @JimmyKo – Robert-Dan Jul 3 '16 at 10:51
  • @JimmyKo just to look inside the system.module? or to debug with the system_librark()? – Robert-Dan Jul 3 '16 at 10:54
  • You don't need to debug with system_library(). I just provide you the location where the core library register to support the using of drupal_add_library() – Jimmy Ko Jul 3 '16 at 14:47

Selectmenu Widget is added in jQuery UI 1.11, which is not supported by core and also jquery_update module. There is an issue on Drupal.org.

Tabs Widget is added since jQuery UI 1.9, you can have it if you installed latest version of jquery_update module with proper configuration.

  • So i am force to use $form['#attached']['js']? Found it here: drupal.org/node/304255 – Robert-Dan Jul 3 '16 at 10:52
  • You can try to add the latest jQuery UI with $form['#attached']['js'], but I don't know if it can work perfectly in Drupal anyway. – Jimmy Ko Jul 3 '16 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.