The drupalorg.module which runs on drupal.org to provide extra features has this code:


    // Hack to make the language list a multiselect field (there is no UI
    // for this in profile module). We need to hack around that profile only
    // ever stores select field values as strings, so we need to explode what
    // was in there for our multiselect form.
    if (isset($form['Personal information']['profile_languages'])) {
      $form['Personal information']['profile_languages']['#multiple'] = TRUE;
      $form['Personal information']['profile_languages']['#default_value'] = explode('; ', $form['Personal information']['profile_languages']['#default_value']);
      $form['#submit'] = array_merge(array('drupalorg_profile_fix_languages'), $form['#submit']);
    }

I was thinking that we could move that idea from being part of drupalorg.module into this module and then remove that custom code and enable this module on drupal.org.

What do you think?

Comments

johnhanley’s picture

I personally dislike multi-select fields because they're cumbersome to use, but they make sense when dealing with dozens of options like languages and so on.

That said, I'm definitely willing to work with you where drupal.org is concerned.

It wouldn't be difficult to add another option for multi-selects. I can't think of any special validation or submission requirements.

The selections are stored and displayed as comma-delimited. Is this acceptable?

Let me know.

Thanks,
John

johnhanley’s picture

Assigned: Unassigned » johnhanley
Status: Active » Fixed

Multi-select is now supported in the latest 6.x.1.2 release.

Status: Fixed » Closed (fixed)

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