1

I have this form

= form_tag(search_index_path, id: 'search-search', class: 'clearfix', method: :get, role: 'search')
  .form-group.search-term
    input.form-control.mousetrap(id="search-input" type="text" name="s" value="#{params[:s]}" autofocus)
  .form-group.search-location
    = hidden_field_tag :lat, nil, { id: 'search-search-lat', class: 'search-lat' }
    = hidden_field_tag :lng, nil, { id: 'search-search-lng', class: 'search-lng' }
    = hidden_field_tag :select_current_location, nil, { id: 'search-search-select-current-location', class: 'search-select-current-location' }
    input.form-control.mousetrap type="text" name="city" placeholder="City/ZIP" value="#{@display_city}"

And I would like to show the "Go" button for both of the input text fields. Right now I get the next button for the first one and the go for the second one, I have managed to submit the form when the user clicks next but it's confusing.

Is there a way I could force the button to say "Go"?

I know one solution would be to have two forms, this works, but if possible I would prefer to avoid it.

moondaisy
  • 4,303
  • 6
  • 41
  • 70
  • Please see this answer: [Check this link](https://stackoverflow.com/questions/19753910/behaviour-of-imeoptions-imeactionid-and-imeactionlabel) – Muhammed Saneef Mar 05 '18 at 11:51
  • @MuhammedSaneef thanks, but I'm not working on Android. It's a website on Rails, this problem occurs only on Android devices (that's why I have the Android tag) – moondaisy Mar 05 '18 at 11:57

0 Answers0