Download & Extend

Multiple Users Autocomplete

This module allows for the creation of form elements that accept multiple usernames for that Drupal site as comma-separated values with autocomplete, much like the experience of free tagging, but with users.

To use this, download and activate the module, then when you're building forms in a module, just add this to the array for the field that you want to use as your multi-user autocomplete:

'#autocomplete_path' => 'user/autocomplete/multiple',

Here's an example of what a whole multiple-user-autocomplete field might look like:

$form['administrators'] = array(
      '#type' => 'textfield',
    '#title' => t('Administrators'),
    '#autocomplete_path' => 'user/autocomplete/multiple',
    '#description' => t('Enter multiple names as comma separated values Like name1, name2, name3'),
    '#required' => FALSE,
  );

Sponsors

Multiple Users Autocomplete was developed by Katherine Lynch for Drexel University Libraries.

Development Notes:

While researching this, it was suggested to me by Crell that a good course of action might be to write this myself, using the free-tagging taxonomy handling in Drupal core as my guide, so this code is very much that, with appropriate changes to make it easier to create free-tagging of users in Drupal forms.

Downloads

Version Downloads Date Links
6.x-2.13 tar.gz (6.52 KB) | zip (7.15 KB) 2011-May-23 Notes

Project Information


Maintainers for Multiple Users Autocomplete

  • kat3_drx - 5 commits
    last: 1 year ago, first: 1 year ago

Issues for Multiple Users Autocomplete

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports