title: Zend Framework forms, decorators and validation: should I go back to plain HTML?
body: <p>I am currently working on a pretty large application which contains a lot of forms.</p>
  
  <p>Up to this moment, I have always been writing my forms by hand and writing my own validation logic, but I have decided it was about time I started using Zend_Form and it's built-in validation routines.</p>
  
  <p>However, I keep stumbling upon more and more problems concerning the (lack of) flexibility caused <a href="http://framework.zend.com/manual/en/zend.form.decorators.html" rel="noreferrer"><code>Zend_Form_Decorator</code></a>. Simple tasks like adding an extra button to a single input-element become incredibly difficult tasks.</p>
  
  <p>I have now reached a point where I am seriously considering dropping the <a href="http://framework.zend.com/manual/en/zend.form.elements.html" rel="noreferrer"><code>Zend_Form_Element</code></a> + <a href="http://framework.zend.com/manual/en/zend.form.decorators" rel="noreferrer"><code>Zend_Form_Decorator</code></a> approach entirely, but I do not want to lose the excellent validation options. </p>
  
  <p><strong>Basically, I want the best of both worlds:</strong></p>
  
  <ul>
  <li><strong>Write forms the way the end-user sees them: <em>in plain HTML</em></strong></li>
  <li><strong>Easily add server-side validations to form fields without breaking too much of the ZF standard behaviour</strong></li>
  </ul>
  
  <p>A possible solution I am considering is writing the forms both on the server side as in the views. This would allow me to easily validate my own forms, but the (in my eyes quite big) downside is that each form should be defined twice, which just feels plain wrong.</p>
  
  <p>Are there any guidelines to do this? Have any of you experienced the same, and if so, how have you solved these issues?</p>
  
  <p>I'd very much like to hear your points of view.</p>