getElement(); if ($form->getAjaxValidation() && !($form instanceof Zend_Form_SubForm)) { /** @var $doc Qs_Doc */ $doc = Zend_Registry::get('doc'); $options = $form->getScriptOptions(); $doc->addScript('js/lib/form.js') ->addScript('js/jquery.scrollTo.js') ->addInitFunction('Qs_Form.init', array($form->getId(), $options)); } return $this; } }