开发者

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开发者_JS百科 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


Phorms comes to mind, and it's lightweight.

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


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.


If you are looking for a standalone form library then Aura.Input is what you need.

I recently wrote how you can

integrate Aura.Input with Aura.View helpers and create a standalone form( with code examples ) : http://harikt.com/blog/2013/05/23/standalone-form-for-php/

You can also integrate with any filtering library you like or with Aura.Filter for a better validation , is over http://harikt.com/blog/2013/05/21/standalone-forms-and-validation/

The code examples are over github : https://github.com/harikt/phpform


Check one of these : Form-validation-library, php-validation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜