Using the basic patch for D7 at http://drupal.org/node/848740, the attachment is the implementation of autocomplete widget option field feature. In basic feature the user is presented with textfield widget in populating the phone number field during content creation. Autocomplete widget offers suggestion of the phone number that has been entered or already exist in the instance of Phone number field table in database.

CommentFileSizeAuthor
cck_phone autocomplete.patch322.54 KBarpeggio

Comments

ckng’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

I'm still cautious about the need for phone number autocomplete. Example use cases?

From my personal use cases so far, phone is limited to user profile and entity-related content such as company, shop, etc, which are mutually exclusive. Unlike some name, label, or taxonomy, the phone number is unlikely to be 'reused' or 'shared' by another entity.

I think this will open up a security breach where end user phone might be exposed unnecessarily.

arpeggio’s picture

Example use case of this is a phone directory website, the user can have a quick hint if the phone number already exist to avoid duplicate entry. But by default the textfield without autocomplete is the enabled widget. Autocomplete is optional for users who want its functionality.

ckng’s picture

Don't think that is a good enough use case. Duplication of such content should be checked on node level, not on field level. Even in phone directory, number are not 'reused' nor 'shared'. The example case also a remote scenario. The risk of accidentally enabling the feature can jeopardize the security, far out weight what the feature could provide.

Don't think this should go into this module, perhaps as another module.

arpeggio’s picture

How sad, this feature is useful to my site's public directory section whereas my encoder can have a quick hint that phone number is already in the database :(

ckng’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Hope is not lost, if you really need this feature, my suggestion is to implement it as a separate module. Maybe somewhere along the line of hook_field_widget_info_alter().

Alternatively, the better/suitable way to tackle this is actually an ahah/ajax validator. Generally it could perform normal phone number validation as user input the number and be easily extended for use in your use case to check for existing number. This is way better than autocompletion and correct in the process flow, IMHO. Then this feature is worth to be included in this module.

As usual, it should be an option and if you like to tackle this, please open a new issue queue.
Marking this as won't fix. Reopen if new cases arise.