0

I coded a simple search form for my website using just a text input for the search term. Also i used the typeahead.js plugin which allows autocomplete while typing.

Everything seems to work fine except when i'm trying to submit the form using the Search button of the ios keyboard. When i tap it nothing happens.

Any ideas about why this is happening?

Here is the form's code:

<form action="[config.site_url]/search/find" method="post" id="main-search-form"> 
 <div class="form-group" id="main-search">
 <input id="topnav_search" name="search_text" class="form-control typeahead" placeholder="" type="text" value="">
 </div>
 <input type="submit" name="submit" style="display: none;" />
</form>

And this is the search ios button that i mean:

enter image description here

asked May 6, 2017 at 12:02
5
  • Does it make a difference if you don’t hide the button? Commented May 6, 2017 at 12:05
  • Are you serious about the [config.site_url]/search/find action? Commented May 6, 2017 at 12:06
  • @Manngo The input field shouldn't be visible (Yes, i tried to make it visible but it didn't make any difference). Also, [config.site_url] is just a codeigniter variable which returns the site's url. Commented May 6, 2017 at 12:10
  • Hey your question asked already here : iPhone search button to submit Commented May 6, 2017 at 13:27
  • @DanielTaub Thanks Daniel!. I will check this. Commented May 6, 2017 at 13:36

1 Answer 1

1

Finally, i just changed the css styling of the submit button to this:

style="position: fixed; top: -1000px;"

Solution found here: Getting iPhone GO button to submit form

answered May 6, 2017 at 13:53
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.