On my site I have two autocomplete_deluxe instances in a form. On submission of the form, the value returned for each was the same. It seems that this is caused by each element containing a ['textfield'] and ['value_field'] item.
My quick and dirty solution was to replace all instances of
$element['textfield'] and $element['value_field'] in autocomplete_deluxe.module with $element['textfield_' . $element['#title']] and $element['value_field_' . $element['#title']].
This seems to work for now, and for my specific use case, but feels fairly hacky so I'm not submitting a patch.
Comments
Comment #1
andykisaragi commentedLooking closer I suppose you'd have to do the same with
$element['list_value'].Comment #2
sepgil commentedPlease use the dev version, I thing it's much more stable than the beta5... :P
Comment #3
emptyvoid commentedConfirmed, upgrading to the dev release the error and issue does not occur any longer.
Comment #4
johnvso this is fixed.
Comment #6
jwjoshuawalker commentedI am using form_alter to use this widget as a Views exposed filters. Using only 1 widget works great. 2 or more as exposed filters on the same view does not.
Looks like this in the form_alter:
The other one only varies in the name & taxonomy vocabulary used.
When submitted, each field submits &textfield=&value_field=Chosen Tags. So that winds up twice in the URL, the latter one overriding anything.
I've tried using a custom views-exposed-form--VIEW.tpl.php and changing the name="value_field" from the "autocomplete_deluxe values" hidden input but the view doesn't recognize the filter input when I do that.
This happened with the beta5 or dev versions.
Comment #7
LNakamura commentedHi, @drastik - I just modified a view so that I have 2 Autocomplete Deluxe exposed filters, and don't see any problems. The 2 filters both function and refine the results as expected. I'm running the latest 2.x dev code for Autocomplete Deluxe.
I'm closing this as outdated, but if you or anyone else still encounter problems w/ multiple AD exposed filters, let me know and I'll re-open this issue.
Thanks!