I am working on a site that requires to have autocomplete results for the number field. The field contains tax rate percentages, and the user should be able to autocomplete a preset list of tax rates.

Attached patch adds support for autocomplete results for the number field. Note that this has some drawbacks: it is no longer possible to increment / decrement the numbers using the arrow keys since these keys are now used to select the autocomplete results. Also the little circle symbol that indicates that the field supports autocomplete is overlapped by the arrow symbols that are provided by the native widget on some browsers.

These minor problems only occur when a developer actually adds their own #autocomplete to the field.

CommentFileSizeAuthor
#1 2459025-1.patch550 bytespfrenssen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pfrenssen’s picture

Status: Active » Needs review
FileSize
550 bytes