I just encountered an error after switching a standard CCK text field to use Autocomplete Widgets. I'm not sure if this is something that can be addressed with a fix to this module, but I wanted to report it anyway in case others encounter the same problem.

My text field originally used the widget type "Select list" with a hard-coded list of valid options in the "Allowed values list". I then installed Autocomplete Widgets and changed the widget type for the text field to "Autocomplete for existing field data". I wanted to allow users to enter new values for this field, in addition to having autocomplete candidates available.

But after changing to the autocomplete widget, I found that I couldn't add new entries to the text field when creating a node; I got a "Myfield: Illegal value" validation error. It turns out that the field was still restricted to the "Allowed values list" I had previously entered under the "Select list" widget type. I had to switch the widget type back to "Select list", delete everything from the "Allowed values list" box, save, then switch back to "Autocomplete for existing field data".

This was confusing to troubleshoot because the "Allowed values list" box no longer appears after you change to the autocomplete widget, and intuitively, I did not expect that settings for a different widget type would impact the "existing field data" autocomplete widget.

This issue could be prevented in the future if Autocomplete Widgets could disregard any "Allowed values list" on file when operating in "existing field data" mode. If that's not possible, displaying a warning if an "allowed values list" is found would let users know that they need to clear out their old allowed values or else the autocomplete widget won't work as advertised.

Thanks for a useful module!

Comments

markus_petrux’s picture

Status: Active » Needs work

I'm marking this issue as needs work, so I know I already visited it. I'll work on a patch when I have the time.

Meanwhile, I have added a "known issues" section to the project page.

drupalnesia’s picture

Category: bug » task
Status: Needs work » Postponed (maintainer needs more info)

This was confusing to troubleshoot because the "Allowed values list" box no longer appears after you change to the autocomplete widget, and intuitively

I just test Autocomplete Widgets 6.x-1.3 on Drupal 6.22, when I change "Select list" to "Autocomplete" the "Allowed values list" box still appear.