Google Product Forums

Re: Handling Empty Searches

omr Apr 26, 2012 10:10 PM
Posted in group: Google Custom Search

Categories: Indexing and Results :

(Note: I'm not a Google employee.)

If you obtain new Custom Search Element code from the control panel, and install the search box code on your site, that search box should not process query submission if the search box is empty.

For example, please try the demonstration search box on the page linked below.  Press the search button and observe that no action is taken if the search box is empty.

To get current Custom Search Element code for your site:  Go to the CSE control panel, click "Look and feel" in the sidebar, select a layout option, click the "Save & Get Code" button, and follow the instructions to use the provided code.

For more information about the available layout options, see under "Setting the Search Element Layout" at:

-- omr