This project is not covered by Drupal’s security advisory policy.

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.

Project information

  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Project categories: Site structure, Access control
  • Created by kat3_drx on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases