|
|
(jQuery) Add “Smart” Default Values to Form TextBoxes
by Matt on 2010/08/20 at 10:07 am
This article covers a handy usability feature that will allow you to set “smart” default values in your form textboxes. The JavaScript handles three things – coloring (gray for default, black for user-entered values), automatically clearing the field when a user selects it, and automatically replacing the default text if the user de-selects the field without entering anything. This is particularly useful for forms targeting mobile browsers (such as iPhone or Android, since you can then use the field itself as a label) – or forms where you want to include some “example text” in certain fields. It’s a very clean, intuitive way of improving the usability of any web form. Continue Reading this Article >>
• Posted under Toolbox and tagged with @Complexity: Intermediate, Forms, JavaScript, jQuery
• Comments (0)
|