PHP form generator and validator

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
devbro
Forum Newbie
Posts: 7
Joined: Tue Mar 18, 2008 11:46 am

PHP form generator and validator

Post by devbro »

Hi Everyone

I am looking for a class, or set of classes, that can do the following for me:
1. validate a form (given a variable and test it against given functions)
2. generate each element of the form (output each element of <input> seperately thru special function)

I looked up some classes from pear but they over complicate the problem :S.

Is there any other alternative out there for this?

thanks in advance
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP form generator and validator

Post by Christopher »

Forms are difficult to create a general system for. PEAR QuickForm is one of the better ones from what I have heard. It is not too difficult to do yourself either.
(#10850)
devbro
Forum Newbie
Posts: 7
Joined: Tue Mar 18, 2008 11:46 am

Re: PHP form generator and validator

Post by devbro »

i worked with quickform. it makes things somewhat more complicated. :S
staar2
Forum Commoner
Posts: 83
Joined: Fri Apr 06, 2007 2:57 am

Re: PHP form generator and validator

Post by staar2 »

You could also implement the zend framework components like zend_form which has really easy way to build up your forms, also you can add the validation rules and filtering options.
Look here http://framework.zend.com/manual/en/zend.form.html
Post Reply