I have extended Zend_Form to create my custom form that I will reuse on some pages of my site. For this form I also created some JavaScript validation based upon jquery.
What I would like to do is add this JavaScript validation for the form in the sub-classed Zend_Form. So every time the form is called the JavaScript gets initiated as well.
In a view script you can use $this->headScript()->appendFile('/js/val.js') and than use echo $this->headScript() in the layout. But headScript() is to my knowledge not possible in Zend_Form.
How can I use headscript in Zend_Form or is their a alternative 'better' approach