bI have a small form as shown below where user can enter some start and end location address in text format. I want to add the autocomplete feature that is in google maps because most people are lazy to type the entire address.
<%= form_tag("/welcome/index", method: "post") do %>
<h5>Current Location</h5>
<%= label_tag :address %><br>
<%= text_field_tag :address %>
<h5>Destination Location</h5>
<%= label_tag :address %><br>
<%= text_field_tag :destaddress %>
<p>
<%= submit_tag("Submit") %>
</p>
Upon doing research i found that it is possible to do with rails using GeoComplete.
Ass suggested by tutorial I tried the following:
I included the required google api scripts in my code and added this
$("address").geocomplete();
It is not working. can someone tell me what I did wrong?