I would like to impletement address autocomplete on my site. I have tries some solutions, but no meets my requirements - they always return addresse in wrong format (I need street_name street_number city postal_code). I would like to use CJuiAutoComplete widget and this is my idea:
-
User starts to type. After 3 characters, the widget calls actionAjaxRequest action in some controller
-
controller calls google api, gets results and provide them to CJuiAutoComplete in a form I want
-
User can choose from offered options
Now my problem is - how to do api ajax call from the controller? is it even possible? if not, how would you do it other way? Thanks for any help