Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
needs to be an @ in there somewhere. If they've chosen a username, you<br />
need to make sure it's not already been taken by someone else. That kind of<br />
thing.<br />
There are two ways of validating input: client-side and server-side. To put it<br />
simply, client-side validation is done by JavaScript, and is purely there for the<br />
user's convenience, so they don't have to submit a form only to find out it<br />
was wrong. Server-side validation will be done with a language like PHP, and<br />
is the final check before the data gets written to a database – if it's wrong at<br />
that point, you have to throw the user an error page and ask them to<br />
re-enter the relevant piece of information.<br />
It's very important that you don't leave vital checking purely up to the<br />
JavaScript, as some of your visitors may have JavaScript turned off, or may<br />
even turn it off deliberately to get around your checks. The last thing you<br />
want is people being able to fill your database with bad information.<br />
7 Ways to Make Your Web Forms Better.<br />
Since many people who design web forms have never designed any form of<br />
any kind in their lives before, it's hardly surprising that plenty of the results<br />
could do with a little improvement – and if you've spent any time on the web,<br />
you'll know just how annoying bad forms can be. In this section, then, we'll<br />
look at seven quick and easy ways to make your web forms much better.<br />
1. Remember the Rest of the World.<br />
This one is a call-out to American websites especially: don't forget that your<br />
site will have more than just American visitors! It's very insulting to be asked<br />
to register for something, only for the site to demand my state and zip code,<br />
leaving no space for me to choose any other country or enter a postal code<br />
in any other format than five digits. To save the trouble of the whole thing, I<br />
usually just go for 'California' and '90210' – a bad entry for that person's<br />
database, just because they didn't consider me when they designed their<br />
form.<br />
2. Don't Use Huge Drop-Downs.<br />
Likewise, though, if you are nice enough to let me choose a country, don't<br />
make me do it from an alphabetised list of every country in the world! The<br />
The Web Design Guide for Newbies |107