1
私のデータベースレコードは、入力の値を持つテーブルに印刷されます。すべてのレコードについて、私はLocationフィールドをGoogleのAPIによって自動完成させる必要があります。無限のGoogleプレイスインスタンス
HTML:
<input name="edit_airplane[1][location]" type="text" class="airplane_location" value="Balmaceda">
Javascriptを:
function initAutocomplete() {
var airplane_location_field = jQuery('.airplane_location');
autocomplete = new google.maps.places.Autocomplete(airplane_location_field), {types : ['geocode']});
autocomplete.addListener('place_changed', function() {
/*
Whenever the value of the location field has changed. I need to
Create a new input field which is hidden with the full address
Of the selected google autocomplete location.
*/
});
}
何が変わった入力フィールドをチェックするための最良の方法だろうか?