WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
How to disable "blank" / null search? (5 posts)

  1. jameztcc
    Member
    Posted 3 years ago #

    Hi,

    I am trying to restrict empty/blank/null search on wordpress using Relavanssi...how can I do that?

    thanks,
    James Tan

  2. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    What do you mean? Please elaborate.

  3. jameztcc
    Member
    Posted 3 years ago #

    What I meant is to dis-allow search of ""(null/empty/blank) inputs. I.e. only if at least 2-3chars are entered as search query.

    Currently without typing anything into the search input, anyone can just perform a query and return results.

  4. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    Add a JavaScript to the search form that prevents sending the form unless there's something in the search field?

  5. jameztcc
    Member
    Posted 3 years ago #

    Thanks! Managed to solve the null problem using a javascript to validate form.

    thanks,
    James Tan

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags