Buy Now
Sign in

Google Address autocomplete

yitzlo , May 23 2017, 23:34
yitzlo 17
May 23 2017, 23:34 #368517
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 64
May 24 2017, 08:53 #368525
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.

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
admin 29
May 24 2017, 09:43 #368527
Hi yitzio,

What is the code you are using for this ?

Best regards,
yitzlo 17
June 12 2017, 21:29 #369317
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

I am using Google Places autocomplete api

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.