[thelist] coding required form fields to work with Javascript turned off

Webmaster webmaster at archetype-it.com
Sat Feb 23 05:50:00 CST 2002

At 02:23 23/02/2002 -0800, you wrote:
>Is there any way to code required fields and alerts into a form without
>using Javascript?

Yes, do it server side. It means a round-trip to the server, and re-loading
the page in case of errors, but it's guaranteed to work no matter what the
client settings are. It's also a "backstop" for JS validation.

<tip author="Veronica Yuill" type="Form validation">
Even if you validate form input using Javascript on the client, always
include the same validation in your server-side processing, to handle
clients that have Javascript turned off, and prevent incorrect or malicious

Veronica Yuill                 email: veronicay at archetype-it.com
Archetype Information Technology Ltd  http://www.archetype-it.com/english/
Dynamic websites for fast-moving businesses

More information about the thelist mailing list