setOption('onsubmit','return App.validate(this)'); $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl(); $this->getElement()->getView()->headScript()->appendFile($baseUrl . '/js/Validator.js'); return parent::getOptions(); } }