I have a stock install of Drupal 6.2 and when i create a free form list field in user profiles and select the "Form will auto-complete while user is typing." setting, the field does not autocomplete.
Steps to reproduce:
1) install Drupal 6.2
2) create a user profile field of type free form list
3) choose option "Form will auto-complete while user is typing."
4) enter values in the field for one user
5) switch users to a user that has the "access user profiles" permission
6) start typing in the free form list field that is supposed to autocomplete...
What happened?
no auto complete suggestions appear
Expected behavior:
Suggestions appear form in auotcomplete popup that we entered in other user profiles
Environment:
Server Apache 2, php 5, mysql 5
Browser Firefox 2, Windows IE7
I think the problem results because free form list fields are stored in the database table profile_values in one column called value. In order for profile_autocomplete to work, they need to be stored as separate rows in this table.
Another issue is the the textarea for this field does not have the form-autocomplete class style associated with it. There is no indication to the user that the ajax request is taking place (throbber, spinner etc). Is this possible in a text area?
Thanks
Jon
Comment | File | Size | Author |
---|---|---|---|
#1 | patch-only-show-autocomplete-option-on-textfield.patch | 962 bytes | jsaints |
Comments
Comment #1
jsaints CreditAttribution: jsaints commentedIt seems that this bug is realted to this one:
http://drupal.org/node/90329
In the end, adding autocomplete functionality to a text area will not even be possible until D7. Textareas in D6 do not support the autocomplete_path parameter in the drupal form API.
We need to disable the "Form will auto-complete while user is typing." setting for all profile field types except for the single line text field. This way we do not confuse users into thinking that autocompletion is possible with other field types.
Here is a patch that fixes the issue.
There is still a bug however that autocomplete profile fields need each comma separated value stored in a separate row of the data base table profile_values. Right now, single line text fields that auto complete only match the whole value that is stored in the value column. For example:
User #1 enters "United States, Mexico" into a single line auto complete profile text field
if User #2 starts typing "Mex", we should expect a match of "Mexico".
Right now, the profile module will only match if User #2 types "United St". It will then match the whole field "United States, Mexico" and not the partial match of "Mexico" or "United States" as expected.
Should I post this one as a new Bug?