I am looking for the perfect PHP HTML form library and I was wondering if any of you could recommend your favorite one.

The Python programming language has a web framework called Django that includes a fantastic class-based HTML form library. It integrates well with the database abstraction layer and it's well coded. My experience with it has been extremely positive.

I am looking for something similar in PHP and, ideally, as a stand-alone library.

It should have:

  1. A class-based structure
  2. Include the ability to add sub-forms
  3. Multiple validation classes and widgets
  4. Include few dependencies outside of regular PHP
  5. Must be compatible with Wordpress