Ajax AutoComplete Support Product Page


AutoComplete - 1 click form submission

Asked 06 Apr 2013 03:28:49
has this question
06 Apr 2013 03:28:49 Matt Penn posted:
I have autocomplete working OK in a search form. However, how can I make it so that when the user clicks on an autocomplete result that the form is automatically submitted, instead of forcing them to click the "submit" button? I want it to work like Google...where if you click on an item in it's autocomplete results list, it automatically initiates the search and you don't have to do another click.


Replied 08 Apr 2013 08:46:01
08 Apr 2013 08:46:01 Vulcho Vulev replied:
Hello Matt.

You can use DMXZone Ajax Form and load the autocomplete inside the form container, after that add onClick form submit behavior. Note that the form will submit each time when you click on the Ajax Form container including the first time when you select the search field.

Here is the step by step guide how you can achieve that:

1.)Place DMXZone Ajax Form on the page.
2.)In the form container place Ajax Autocomplete.
3.)Switch your DW in design view and select the Ajax Autocomplete field.
4.)From "Tag Inspector" in DW go to "Behaviors" Tab and select "onClick" event.
5.)Click the "Add Behavior" Button (The black cross with the dropdown icon)
6.)Select: DMXzone>Control DMXZone Ajax Form
7.)From the popup window select:
DMXZone Ajax Form: Your Ajax Form name (dmxAjaxForm1 by default)
Action: submit
8.)Click o.k.

Upload the page and preview it in your browser.

Replied 12 Apr 2013 03:37:15
12 Apr 2013 03:37:15 Matt Penn replied:
Thanks Vulcho. But that's not really the best solution for me. Using your solution, as soon as the user places their cursor in the form field it submits it.

I guess I had expected the auto-complete to function just like most other places where I see an autocomplete in use. Where if you see an auto-complete result that you are interested in, you click it, and the search form submits instantly (i.e. you don't have to click submit).

Will the DMXzone extension not function in this manner?

Reply to this topic