views:

348

answers:

1

I've seen some posts and questions regarding this: how can I use Symfony's sfForm as a standalone library?

Just for managing a simple "hand-made" form but without the bulk of the framework.

+1  A: 

The practicality of the Symfony forms module is actually its integration with the rest of the framework - especially with the object model and the routing system. The forms module is useful because it can build your fields automatically based on your schema and because it integrated with the routing module for creating and updating. There is little point to using the forms without the rest of the modules.

That said, it is possible that Sensio will eventually release some sort of forms component which may or may not be based on sfForm as a stand alone component in http://components.symfony-project.org/.

If what you're looking for is abstracting the creation of the form's markup, then you can look into something like this http://phpformgen.sourceforge.net/.

JuanD
Thanks for the reply.Even if in the context of symfony this module works great , i do believe the current versions of the framework are decoupled enough, so that one could use it to handle -at least- validations, as described in the "forms book", the sfForm class allows the creation of widgets and validators "manually", and provides methods to check the form status and fields. Perhaps my question wasn't clear as i rather use a known framework implementantion than to validate and process a simple form by hand.
madarve