diff --git a/js/location_autofill.js b/js/location_autofill.js
index 62b97b1a6a6cf0fd91b5a466fb27e48a7e16e0d1..dfb940993ee119a2c65b3f90b36dd39140b11853 100644
--- a/js/location_autofill.js
+++ b/js/location_autofill.js
@@ -18,8 +18,8 @@
         }
 
         // Set coordinates and re-center map.
-        $('input#lat-edit-field-uw-service-location-coord-0-value').val(location.latitude);
-        $('input#lon-edit-field-uw-service-location-coord-0-value').val(location.longitude).change();
+        $('input#edit-field-uw-service-location-coord-0-value-lat').val(location.latitude);
+        $('input#edit-field-uw-service-location-coord-0-value-lon').val(location.longitude).change();
 
         // Set the country if it has changed.
         var select_country = $('#edit-field-uw-service-location-0 select.country');