_getNewForm(); if ($form->validate()) { $data = $form->getValues(); $form->getElement('dump')->setValue(nl2br(var_export($data, true))); } $this->_addFormItem($form); return $this; } protected function _getNewForm(array $options = []) { $form = new Qs_Form($this->_getFormOptions()); $form->addElement('hidden', 'action', ['value' => 'insert']); $this->_bindFormFields($form); return $form; } protected function _bindFormFields(Qs_Form $form) { $form->addElement('static', 'dump', ['label' => 'SUBMITTED VALUES']); $form->addElement('phone', 'phoneDash1', ['label' => 'Phone Dash #1', 'format' => Qs_Form_Element_Phone::DASH_FORMAT]); $form->addElement('phone', 'phoneDot1', ['label' => 'Phone Dot #1']); $form->addElement('phone', 'phoneDash2', ['label' => 'Phone Dash #2', 'format' => Qs_Form_Element_Phone::DASH_FORMAT, 'required' => true]); $form->addElement('phone', 'phoneDot2', ['label' => 'Phone Dot #2', 'required' => true]); return $this; } }