Gravatar for erkan.yildiz@avanade.com

Question by erkany, Jan 9, 2015 1:38 PM

Prevent search when search box is empty

Is it possible to prevent the search if search box is empty?

1 Reply
Gravatar for mlaporte@coveo.com

Answer by Martin Laporte, Jan 11, 2015 10:50 AM

You can register a click handler on the search button and have it return false to prevent other handlers to process the event.

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Jan 11, 2015 7:40 PM

Thanks, Can you provide some code snippet please?

Ask a question