Page 1 of 1

PHP form generator and validator

Posted: Sun Mar 23, 2008 7:38 pm
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

Re: PHP form generator and validator

Posted: Sun Mar 23, 2008 8:49 pm
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.

Re: PHP form generator and validator

Posted: Tue Mar 25, 2008 11:14 am
by devbro
i worked with quickform. it makes things somewhat more complicated. :S

Re: PHP form generator and validator

Posted: Tue Mar 25, 2008 11:19 am
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