jQuery Plugin released: Simply Smart Login Fields

Today I released a new jQuery plugin called Simply Smart Login Fields. It’s actually not that smart, in fact it’s really plain simple. It’s a plugin for adding default values to login form fields.

Inline login form

Adding default values to form fields can be useful in situations where the design doesn’t allow for a text label - for example when the login form is tucked neatly up in the top corner of a page.

The problem comes when trying to add default values to password fields. Of course passwords don’t show plain text, and certain browsers’ security models prevent the type attribute from being changed on the fly.

This is where my plugin comes to the rescue. All it does is hide the normal password field and create a fake password text field (which can contain the default value). When the focus event is called on the fake password field, it is hidden and replaced with the real password field. Simple really.

The plugin can be downloaded from my Github repository.

Documentation is included in the README file and an HTML demo is bundled with the download.

Let me know if you come across any problems or have any ideas for the plugin.