I recently updated the ZF modelform generator to include an adapter compatible with Doctrine 2. It’s otherwise completely functional, but it ignores many-to-many relations when generating forms (because I didn’t need this feature yet ;) ). Usage example after the jump.
Validating Zend_Forms using model objects
Zend_Forms, models, validation and how they all work together is a tricky topic. There are many opinions and many ways to do it. This time I’ll show you what I think could be the answer to validating forms without having to duplicate validation code both in a model class and in your form.
Integrating FCKeditor with Zend_Form
How to use FCKeditor, or any other WYSIWYG editor, with Zend_Form? Another relatively common question. There are many ways you can do this, but let’s look at these two as they are the best in my opinion: Adding some JavaScript to your view script Creating a Zend_Form_Decorator We’ll be using FCKeditor, but you can apply the techniques shown to others, …
Database backed Zend_Form elements
A relatively common task when working with forms is filling select boxes or checkbox and radiobutton lists from a database. It’s not very tricky to query a database, and fill a Zend_Form element’s possible values from the resultset, but it can be quite boring and extraneous code…
We could also create an element which we can give some SQL, and it’ll fill itself automatically! This way you can even define database-backed elements in XML or INI configuration files.