Allows the site administrator to specify a minimum length for autocomplete strings, to stop autocomplete from running SQL queries with potentially huge result sets.

It does this by replacing Drupals Drupal.ACDB.prototype.search function with a little function that checks if the user-entered string is shorter than the set minimum length. If so, execution is stopped and the back-end callback handler that provides completion targets is not accessed.

Once the search string is longer than the limit, the original function will be called to provide completion targets.

When enabled, the module will default to a minimum string length of 2. You can change this setting on the Performance page.

Developers can set a custom minimum autocomplete length for each field by specifying the $element['#attributes']['data-limit'] property in their form definition.

Supporting organizations: 

Project information

Releases