Google Address autocomplete

yitzlo 23 May, 2017
How can I add google address autocomplete api to a form field?

I managed to create custom html which loads the api, and displays the field correctly, but I cannot get it to be recognized by chronoforms as a form field, so I can add it to database etc.?

What is the code to create a custom field in a custom html ?
GreyHead 24 May, 2017
Answer
Hi yitzio,

If your code creates a form input then it will be recognised by the form if either:

a. It is inside the <form> . . . </form> tags. or

b. it has a form='form-id' attribute set (where 'form-id' is the id of the ChronoForm.

You can add any valid HTML in a Custom Code element in the Designer tab of your form.

Bob
Max_admin 24 May, 2017
Hi yitzio,

What is the code you are using for this ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
yitzlo 12 Jun, 2017
1 Likes
Hi Bob,

Thanks for your response.

I figured this out, It was working but was not saving in the database, regenerating the database fixed this


Max,
I am using Google Places autocomplete api
https://developers.google.com/maps/documentation/javascript/places-autocomplete

I figured out the easiest way to do this is to add a form field and set the id to be "autocomplete", then add the javascript from google in a custom code area, no need for a custom form field.
This topic is locked and no more replies can be posted.