lorenzoongithub / completely

A fresh take on autocompletion for a wonderful user experience
http://complete-ly.appspot.com/
MIT License
252 stars 32 forks source link

about documentation.. #28

Closed price2b closed 9 years ago

price2b commented 9 years ago

Lorenzo, great script. I have a doubt regarding the use of these examples. in booking page you say a "form - which would consist of many check-boxes, radio-buttons, drop-downs - is stripped to just one text box" If i want to create a form, where do we assign values to pass? in booking example you have ->id: ->options. but no form element name or similar to pass with the submit button. sorry, probably is more related to the use of javascript but im confused in the way i have to use it. thank you so much for any clarification, brgds

lorenzoongithub commented 9 years ago

Hi Sebastian, I am glad you like the script. Regarding your question: the idea of stripping down a form to a text with auto-completion is a general concept. A form usually asks you to fill a few fields but - in some situations at least - this equates to just a simple statement "I want to go to Rome From London tomorrow by airplane". So that could be one text versus four fields (departure, destination, when, how) hope it helps cheers

price2b commented 9 years ago

yes i understand. but usually that information in a form goes in: -form method="post" action="<?php echo $this->getUrl('module/controller/action') ?>" id="zzzzz" -input type="text" name="departure" -input type="text" name="destination" -input type="text" name="when" -input type="text" name="how" -button type="submit"

if completely is only used in one textarea its pretty simple the implementation, but using many fields i dont understand how it works using ID, Options and (name?)... thats the part I cannot understand, thank you in advance. brgds!

lorenzoongithub commented 9 years ago

that form would be easily populated by a javascript as the user hits a submit method.

price2b commented 9 years ago

perfect I understand. based on your reply I found something working in that way https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform thank you so much. brgds!