Best practice on custom forms

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
flycast
Forum Commoner
Posts: 37
Joined: Wed Jun 01, 2005 7:33 pm

Best practice on custom forms

Post by flycast »

Not a PHP question per se but...

Does anybody have any good, experience earned advice for building larger custom forms. This is for a site where the customer wants to have some applications filled out online. Each form would be custom and would need some javascript to check for some values (like valid zip code) as well as check to make sure that everything is filled out properly.

Does anybody have any recommendations for a good form building software package that does a good job of building the form and the javascript checking logic?
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Generally: client-side form-validation is generally frowned upon for the simple reason that Javascript can be disabled easily, i.e. no validation.
Server-side validation is what you're looking for.

There are a number of ready-made PHP-classes (I remember a PEAR class which had a very good reputation) that offer to do these things, however, by the sounds of it, that would be overkill for what you're intending to do.
Post Reply