Hello, i want to know, is there any way to force user can only select the address provided in dropdown list?
Currently everything working well, but user can proceed without select the address from the dropdown list, can anyone help? Thanks in advance
<input type="text" class="form-control" id="address" name="address" required>
<script>
options = {
language: 'en-AU',
types: ['geocode'],
componentRestrictions: { country: "my" }
}
var autocomplete = new google.maps.places.Autocomplete($("#address")[0], options);
google.maps.event.addListener(autocomplete, 'place_changed', function() {
var place = autocomplete.getPlace();
console.log(place.address_components);
});
</script>