13 reputation
2
bio website
location Portugal
age
visits member for 1 year, 6 months
seen May 26 at 11:17

Dec
28
comment What is the best approach to disallow an empty search?
It's a client-side validation. The idea is to avoid a request to the server just to say "try again". This way, the user gets immediately notified, and can correct the situation before submitting him/her final query.
Dec
28
comment What is the best approach to disallow an empty search?
I tried this, and worked great. The form doesn't give the idea it is non-fnuctional. The button is only disabled in case of error, telling the user something went wrong with the query (assuming empty query). Thank you!
Dec
28
awarded  Scholar
Dec
28
accepted What is the best approach to disallow an empty search?
Dec
28
comment What is the best approach to disallow an empty search?
It's a good idea, but it uses labels, which I stated that I prefer not to use in this case.
Dec
28
comment What is the best approach to disallow an empty search?
@Simon, the idea is to disallow an user from searching without entering text in the search box. It's only from the usability view, since the results page is ready to handle empty query strings, resulting in an error.
Dec
28
comment What is the best approach to disallow an empty search?
Right now, the button is disabled by default. When the box got focus, the placeholder disappears and the button remain disabled until the user types something. The problem is that, without interacting with the search box, it may appear as frozen/disabled, because the submit button is disabled, and the placeholder text is grey.
Dec
28
awarded  Student
Dec
28
asked What is the best approach to disallow an empty search?