I'm getting a similar problem when I add an item, then remove
it. It removes it from the textbox but keeps the value in the
hidden field, then when I go to add another item it appends it to
the hidden field, so now there are two values in the hidden field
but only one item in the textbox that can be removed.
Vadim's patch works great and fixes this bug. Thanks Vadim!
I don't want to upload the full file as my configs are
different. However, the clue for implementing Vadim's patch is in
viewing the source when you click on the patch (or downloading the
file to your desktop).
You'll see @@ signs which indicate which line number the patch
starts. You'll also see the following at the beginning of
which indicates to remove this line
which indicates what to replace what you have just removed with
If there are no - or + then those lines are just there for
reference to help you see where you are and you just leave
I noticed the same problem. When the form is submitted the first element passes on submit even if all previously selected elements was deleted. I noticed a related bug: for the first usage the autosuggest field suggests all available data for the first element and for the second element; then it retire selected element from the suggest list.
Yes. I too had same issue. After changing line no: 334
+ ",", ""));
it is working fine.
I had the same problem also - I have multiple autosuggest
widgets on one page, and all of them can only have one thing
assigned to it.
Blake - your solution looks good for multiple autosuggest
widgets on one page.
// remove the input value currently in 'as-values-<id autosuggest binded to>',
// as it doesn't always get removed using the delete key or by clicking the "x" inside the selection.
// parentId is 'as-selections-<id autosuggest binded to>', get the last part
var indexLastDash = elem.parentNode.id.lastIndexOf('-');
var id = elem.parentNode.id.substr(indexLastDash+1, elem.parentNode.id.length);
// this only works because only 1 item can be assigned per widget
$("[id^=as-values-" + id + "]").attr("value", "");