Abuse of forms

18th of April, 2008 (Last modified: 14th of April, 2008) Håvard WWW , Thoughts ,

The most common way to get input from users when dealing with web pages is through forms of some sort. At the same time there are an amazing number of forms that has been designed without the user in mind at all. This is where a site starts to remove itself from the very reason they exists; their users. After a few years doing web programming and being an active user of the Internet I've both done some rather nasty mistakes myself and I've seen some of the school-examples of how not to do forms. Web pages are about one thing, and one alone; to serve your visitors. It's a one way street where it's all about making the most out of the short moment that your users are interested in your site.

From the web developer perspective I can understand why these solutions are used; they're easy to control. Computers don't know what to expect so they will accept more or less everything -- databases won't.

If a user is typing her phone number with spaces or land code a simple integer-field in your database won't do much good. But that's your problem, not the users. Chances are that they couldn't care less about your database setup, nor should they! Most users will type their phone number in a way that they can easily check to see if it's correct. Some of them will even type it with spaces in order to make it easier for you to read when you're trying to contact them. After all, the user did bother to fill out a form and likely she wants to get something in return -- like a call.

The key to a good form is to be as simple and concise as possible. Fill out this form and then move on. Simplicity is key! If you've done a good job with your forms the users might even not notice that they've filled out a form. Sharing information, such as e-mail address or a phone number, is key to starting a dialogue. Once that first step has been taken the rest should be easy -- the user has shown interest.

Small snippets of code work miracles, if they're only good for you and your database chances are that they're no good at all. Technology is only useful when it's helping people. Remember that you and your site are dependent on your visitors. Why not be nice to them?