addElement('email', 'email', array('label' => 'Email Address', 'required' => true)); return $this; } protected function _initButtons() { parent::_initButtons(); $this->getElement('btnSubmit')->setLabel('Send'); $this->getElement('btnSubmit')->setAttrib('class', 'btn btn-primary btn-submit'); $this->getElement('btnCancel')->setAttrib('class', 'btn btn-cancel'); $this->addDisplayGroup(array('btnCancel', 'btnSubmit'), 'submitGroup'); return $this; } public function getScriptOptions() { $this->_scriptOptions['onSuccessCallback'] = 'emailToForm.onSendEmailSuccessCallback'; return parent::getScriptOptions(); } }