Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP form generation and validation standalone class

I am looking for a form class that:

  1. Is standalone/doesnt need a framework to run
  2. Has easily configurable validation
  3. Has validation and generation for all form fields including checkboxes(one solution I found was great except it didnt have any check box functionality)

I have had a look on google and stackoverflow but most everything I found was a year old, I am hoping in the last year something has been developed or improved.

My reason for asking is that I have a couple of very large forms to make that without a form class are going to take ages to build. Unfortunatly I dont have time to develop my own class but I do have time to learn and use a recommended one as undoubtedly it will be far faster than writing hardcoded html forms with a PHP validation script.

I hope someone can help Regards Luke

UPDATE:

Phorms has been fantastic, very simple to use syntax and very easy to bring into a project, the ability to set data for the form is great and also very simple to use, so great for a cms needing to edit articles etc.

UPDATE 2:

I wrote my own form class because Phorms did not allow for enough customising of html for me. Nibble forms is hopefully very simple and easy to use. I like it but I am a little bias :)

Update 3 (Feb 2013)

This has now evolved into Nibble Forms 2 which uses PHP5.3 namespaces and conforms to the PSR 0,1 and 2 coding standards

like image 861
Luke Avatar asked Jun 22 '10 10:06

Luke


2 Answers

Phorms comes to mind, and it's lightweight.

The author of PHPClasses.org also has a very complete, altough somewhat blowated library.

like image 145
Alix Axel Avatar answered Sep 18 '22 11:09

Alix Axel


Another recent project worth checking out is http://code.google.com/p/php-form-builder-class/. I have used this project in my development and would recommend.

like image 27
ajporterfield Avatar answered Sep 18 '22 11:09

ajporterfield