Search form without submit button

Is it possible to make the searchform work by hitting enter and not by using the submit button? I use the searchbox this way in my website (WordPress) and like the ZP part of the site to look identical.

Comments

  • acrylian Administrator, Developer
    For me it does work with hitting just enter both on our site and on my test site actually.
  • Of course... :( Never tried that.
    I looked at the printsearchform function but can't see a way to add a text into the search input field, a text like 'search here'.
  • acrylian Administrator, Developer
    The function has no option for that (we have the button..;-)). Either make a custom theme function out of it or add the text via jQuery for example.
  • jackdaw Member
    I hid the submit button with css, but somehow I didn't manage to do the same with the toggle button. Also when I added a search term, and after that wanted to search for something else, the input field shows an AND and searches for both words. In the options page I chose for 'space' and not for OR or AND.

    example on the left
  • acrylian Administrator, Developer
    You need that icon button to set the search free again. The search engine always searches within the results of the previous search otherwise. The setting for space or AND/OR has nothing to do with this.
  • jackdaw Member
    'The search engine always searches within the results of the previous search...'

    And this can't be disabled in any way? I really like a search bar as simple as can be. Too many options can be confusing for visitors imho.
  • acrylian Administrator, Developer
    As far as I remember the only way would be to make a custom function out of printSearchForm(). Sbillard surely knows more in case I missed anything.

    Btw, this search within results was added on several user requests.
  • jackdaw Member
    I escaped some lines in template-functions.php and now I have what I wanted ;)

    The search within search sounds good, and perhaps I will use it someday. But for my own site and also probably for a lot of others, it would be nice to have an option on the admin search page which kind of search someone wants.
  • You can clear the search parameters. This was discussed in the past on the forum, maybe ou can do a search and find the thread.
Sign In or Register to comment.