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 ?
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 ?
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
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
Hi yitzio,
What is the code you are using for this ?
Best regards,
Max
What is the code you are using for this ?
Best regards,
Max
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.
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.