本文整理汇总了PHP中Zend_Form_SubForm类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_SubForm类的具体用法?PHP Zend_Form_SubForm怎么用?PHP Zend_Form_SubForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Form_SubForm类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareForm
/**
* Prepare form
*
* @param Uni_Core_Form $form
*/
protected function _prepareForm(Uni_Core_Form $form)
{
$form->setName('menu')->setMethod('post');
$subForm1 = new Zend_Form_SubForm();
$subForm1->setLegend('Menu Item Information');
$subForm1->setDescription('Menu Item Information');
$idField = new Zend_Form_Element_Hidden('id');
$title = new Zend_Form_Element_Text('title', array('class' => 'required', 'maxlength' => 200));
$title->setRequired(true)->setLabel('Title')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$link = new Zend_Form_Element_Text('link', array('maxlength' => 200));
$link->setLabel('Link')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setDescription('Use module/controller/action for internal links or http://www.example.com for external links');
$open_window = new Zend_Form_Element_Select('open_window', array('class' => 'required', 'maxlength' => 200));
$open_window->setRequired(true)->setLabel('Open Window')->setMultiOptions(Fox::getModel('navigation/menu')->getAllTargetWindows());
$status = new Zend_Form_Element_Select('status', array('class' => 'required', 'maxlength' => 200));
$status->setRequired(true)->setLabel('Status')->setMultiOptions(Fox::getModel('navigation/menu')->getAllStatuses());
$sort_order = new Zend_Form_Element_Text('sort_order', array('class' => 'required', 'maxlength' => 200));
$sort_order->setRequired(true)->setLabel('Sort Order')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$style_class = new Zend_Form_Element_Text('style_class');
$style_class->setLabel('Style Class')->addFilter('StripTags')->addFilter('StringTrim');
$menugroup = new Zend_Form_Element_Multiselect('menu_group', array('class' => 'required'));
$menugroup->setRequired(true)->setLabel('Menu Group')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setMultiOptions(Fox::getModel('navigation/menugroup')->getMenuGroupOptions());
$subForm1->addElements(array($idField, $title, $link, $open_window, $sort_order, $style_class, $status, $menugroup));
$form->addSubForm($subForm1, 'subform1');
parent::_prepareForm($form);
}
示例2: init
public function init()
{
parent::init();
/*
* Translations
*/
$subForm = new Zend_Form_SubForm('Translation');
$langs = Model_Hm_Lang::listAll();
foreach ($langs as $lang) {
$subSubForm = new Zend_Form_SubForm($lang->code);
$element = new Zend_Form_Element_Text('title');
$element->setLabel('Titel (eigen)')->setDescription('Deze titel is voor gebruik in eigen administratie.')->setRequired(true);
$subSubForm->addElement($element);
$element = new Zend_Form_Element_Text('display_title');
$element->setLabel('Titel (gebruiker)')->setDescription('Deze titel krijgen de gebruikesr van het systeem te zien.')->setRequired(true);
$subSubForm->addElement($element);
$element = new Zend_Form_Element_Textarea('description');
$element->setLabel('Omschrijving')->setRequired(true)->setValidators(array(array('stringLength', false, array('min' => 40))))->setAttrib('class', 'autoexpand')->setAttrib('rows', 2);
$subSubForm->addElement($element);
$subSubForm->addDisplayGroup(array('title', 'display_title', 'description'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
$subForm->addSubForm($subSubForm, $lang->code);
$this->bhvkSubDecorators($subSubForm);
}
$this->addSubForm($subForm, 'Translation');
$this->bhvkSubDecorators($subForm);
/*
* Submit
*/
$element = new Zend_Form_Element_Submit('submit_chargeoptional');
$element->setLabel('Verwerken')->setAttrib('class', 'submit');
$this->addElement($element);
$this->addDisplayGroup(array('submit_chargeoptional'), 'submit', array('class' => 'submit'));
$this->bhvkDecorators();
$this->bhvkDecorateSubmitElement($this->getElement('submit_chargeoptional'));
}
示例3: init
public function init()
{
$this->setAttrib('id', 'customAttribute');
// Create and configure username element:
$label = $this->createElement('text', 'label', array('label' => 'Label:'));
$label->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags');
$description = $this->createElement('text', 'description', array('label' => 'Description:'));
$description->addFilter('StringTrim')->addFilter('StripTags');
$required = $this->createElement('select', 'required', array('label' => 'Required?'));
$required->setRequired(true)->setMultiOptions(array('1' => 'Yes', '0' => 'No'))->setAllowEmpty(false);
$rowCt = $this->createElement('hidden', 'rowCt');
$rowCt->setValue($this->_numberOfOptions);
$rowCt->setDecorators(array('ViewHelper'));
$this->addElements(array($label, $description, $required, $rowCt));
if ($this->_numberOfOptions != 0) {
$container = new Zend_Form_SubForm();
$container->setDescription('Options:');
$container->setDecorators(array(array('Description', array('tag' => 'label', 'class' => 'control-label')), array('FormElements'), array(array('controlsWrapper' => 'HtmlTag'), array('tag' => 'div', 'class' => 'control-group', 'id' => 'optionElement'))));
$container->setElementDecorators(array('ViewHelper', 'FormElements'));
$this->addSubForm($container, 'options');
for ($i = 0; $i < $this->_numberOfOptions; $i++) {
$optionSubform = new Ot_Form_CustomAttributeOption();
$container->addSubForm($optionSubform, $i);
}
$this->addElement('button', 'addElement', array('buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_SUCCESS, 'label' => 'Add Option', 'icon' => 'plus', 'whiteIcon' => true, 'iconPosition' => Twitter_Bootstrap_Form_Element_Button::ICON_POSITION_LEFT));
}
$this->addElement('submit', 'submit', array('buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_PRIMARY, 'label' => 'Save Attribute'));
$this->addElement('button', 'cancel', array('label' => 'form-button-cancel', 'type' => 'button'));
$this->addDisplayGroup(array('submit', 'cancel'), 'actions', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
return $this;
}
示例4: addRows
/**
* Adds extra rows to the form
*
* @access public
* @param mixed $data. (default: null)
* @return void
*/
public function addRows($start, $end)
{
for ($i = $start; $i < $end; $i++) {
$rows = new Zend_Form_SubForm();
$rows->setIsArray(true);
$rows->setOrder($i);
foreach ($this->_childlist as $col => $name) {
switch ($col) {
case "item_id":
$rows->addElement("select", $col, array("attribs" => array("class" => "form-control products"), "filters" => array("StringTrim", "StripTags"), "allowEmpty" => true, "required" => false, "registerInArrayValidator" => false, "multiOptions" => $this->_childlist[$col], "validators" => array(), "belongsTo" => "rows{$i}"));
break;
case "number":
$rows->addElement("select", $col, array("attribs" => array("class" => "form-control batches"), "filters" => array("StringTrim", "StripTags"), "allowEmpty" => true, "required" => false, "registerInArrayValidator" => false, "multiOptions" => $this->_childlist[$col], "validators" => array(), "belongsTo" => "rows{$i}"));
break;
default:
$rows->addElement("select", $col, array("attribs" => array("class" => "form-control"), "filters" => array("StringTrim", "StripTags"), "allowEmpty" => true, "required" => false, "registerInArrayValidator" => false, "multiOptions" => $this->_childlist[$col], "validators" => array(), "belongsTo" => "rows{$i}"));
break;
}
}
$rows->addElement("text", "ava_qty", array("attribs" => array("class" => "form-control", "readonly" => "readonly"), "allowEmpty" => false, "filters" => array("StringTrim", "StripTags"), "validators" => array(), "belongsTo" => "rows{$i}"));
$rows->addElement("text", "expiry_date", array("attribs" => array("class" => "form-control", "readonly" => "readonly"), "allowEmpty" => false, "filters" => array("StringTrim", "StripTags"), "validators" => array(), "belongsTo" => "rows{$i}"));
$rows->addElement("text", "quantity", array("attribs" => array("class" => "form-control"), "allowEmpty" => false, "filters" => array("StringTrim", "StripTags"), "validators" => array(), "belongsTo" => "rows{$i}"));
foreach ($rows->getElements() as $element) {
$element->removeDecorator("Label");
$element->removeDecorator("HtmlTag");
}
$this->addSubForm($rows, "rows{$i}");
}
}
示例5: buildForm
public function buildForm()
{
$this->clearElements();
$hourForm = new Zend_Form_SubForm();
foreach ($this->data as $record) {
$elm = new Zend_Form_Element((string) $record['id']);
$elm->setValue($record);
$hourForm->addElement($elm);
}
$this->addSubForm($hourForm, $this->key_existing);
// add template element
$newForm = new Zend_Form_SubForm();
$elm = new Zend_Form_Element('__unique__');
$newForm->addElement($elm);
// add elements based on $_POST, (this is crap but will do for now)
if (isset($_POST['hour_new'])) {
foreach ($_POST['hour_new'] as $idx => $values) {
if ($idx != '__unique__') {
$elm = new Zend_Form_Element($idx);
$elm->setValue($values);
$newForm->addElement($elm);
}
}
}
$this->addSubForm($newForm, $this->key_new);
}
示例6: init
public function init()
{
parent::init();
$subForm = new Zend_Form_SubForm('Translation');
$langs = Model_Hm_Lang::listAll();
foreach ($langs as $lang) {
$subSubForm = new Zend_Form_SubForm($lang->code);
$element = new Zend_Form_Element_Text('name');
$element->setLabel('Naam')->setAttrib('maxlength', 64)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 64))))->setRequired(true);
$subSubForm->addElement($element);
$element = new Zend_Form_Element_Textarea('description');
$element->setLabel('Omschrijving')->setRequired(true)->setValidators(array(array('stringLength', false, array('min' => 40))))->setAttrib('class', 'autoexpand')->setAttrib('rows', 2);
$subSubForm->addElement($element);
$subSubForm->addDisplayGroup(array('name', 'description'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
$subForm->addSubForm($subSubForm, $lang->code);
$this->bhvkSubDecorators($subSubForm);
}
$this->addSubForm($subForm, 'Translation');
$this->bhvkSubDecorators($subForm);
$element = new Zend_Form_Element_Submit('submit_category');
$element->setLabel('Verwerken')->setAttrib('class', 'submit');
$this->addElement($element)->addDisplayGroup(array('submit_category'), 'submit', array('class' => 'submit'));
$this->bhvkDecorators();
$this->bhvkDecorateSubmit('submit_category');
}
示例7: populate
public function populate(array $values)
{
$diseasesList = $this->_object->_diseasesSrc();
$oDiseases = new DiseasesDetailsObject();
$dData = $oDiseases->findData(array($oDiseases->getForeignKey() => $values[$this->_object->getForeignKey()]));
$fieldSet = $this->getDisplayGroup('diseases');
$i = 6;
foreach ($diseasesList as $id => $disease) {
$tmpForm = new FormDiseasesDetails(array('object' => $oDiseases, 'isXmlHttpRequest' => true));
if (!empty($values['MR_Diseases']) && in_array($id, $values['MR_Diseases'])) {
$oDiseases->setFilters(array($oDiseases->getForeignKey() => $values[$this->_object->getForeignKey()], 'DD_DiseaseId' => $id));
$data = $oDiseases->getAll();
$data[0]['DD_TypeMedic'] = explode(',', $data[0]['DD_TypeMedic']);
$tmpForm->populate($data[0]);
}
$elems = $tmpForm->getElements();
$test = new Zend_Form_SubForm();
$test->setDisableLoadDefaultDecorators(true);
$test->addElements($elems);
$test->removeDecorator('DtDdWrapper');
$test->setLegend('Détails pour ' . $disease);
$test->setAttrib('class', 'infosFieldsetParent fieldsetDiseaseDetails');
$test->setOrder($i++);
$this->addSubForm($test, 'dd_' . $id);
}
parent::populate($values);
}
示例8: init
public function init()
{
$this->setAction('/core/submit/new');
$type = new Zend_Form_Element_MultiCheckbox('submission_type');
$type->setLabel('')->setRequired(false)->setAttrib('class', 'tiny')->addMultiOptions($this->_getFieldValues('submission_type'))->setSeparator('<br />')->setDecorators(array('Composite'));
$title = new Zend_Form_Element_Text('title');
$title->setLabel('Title')->setRequired(true)->addValidator('StringLength', true, array(2, 64, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer title', Zend_Validate_StringLength::TOO_LONG => 'Your title is too long')))->setAttrib('class', 'medium')->setDescription('Must be between 2 and 64 characters')->setAttrib('maxLength', 64)->setDecorators(array('Composite'));
$audience = new Zend_Form_Element_Radio('target_audience');
$audience->setLabel('Please mark the target audience for your presentation')->setRequired(true)->setAttrib('class', 'tiny')->addMultiOptions($this->_getFieldValues('target_audience'))->setSeparator('<br />')->setDecorators(array('Composite'));
$publish = new Zend_Form_Element_Radio('publish_paper');
$publish->setLabel('Please indicate whether you wish to prepare a full paper for possible publication')->setRequired(true)->setAttrib('class', 'tiny')->addMultiOptions($this->_getFieldValues('publish_paper', 'submit'))->setSeparator('<br />')->setDecorators(array('Composite'));
$topicModel = new Core_Model_Topic();
$topicsForSelect = $topicModel->getTopicsForSelect();
$topicsel = new Zend_Form_Element_MultiCheckbox('topic');
$topicsel->setLabel('Topic')->setRequired(false)->setAttrib('class', 'tiny')->setMultiOptions($topicsForSelect)->setSeparator('<br />')->setDecorators(array('Composite'));
$keywords = new Zend_Form_Element_Text('keywords');
$keywords->setLabel('Keywords')->setRequired(false)->addValidator('StringLength', true, array(2, 500, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide longer keywords', Zend_Validate_StringLength::TOO_LONG => 'Your keywords are too long')))->setAttrib('class', 'medium')->setDescription('Must be between 2 and 500 characters')->setDecorators(array('Composite'));
$abstract = new Zend_Form_Element_Textarea('abstract');
$abstract->setLabel('Submission Summary (If your submission is accepted, this will be publicly visible!)')->setAttrib('class', 'small')->setDescription('Must be between 5 and 2000 characters')->setRequired(false)->addValidator('StringLength', true, array(5, 2000, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer abstract', Zend_Validate_StringLength::TOO_LONG => 'Your abstract is too long')))->setDecorators(array('Composite'));
$comment = new Zend_Form_Element_Textarea('comment');
$comment->setLabel('Information for Reviewers')->setAttrib('class', 'small')->setDescription('Must be between 5 and 1000 characters')->setRequired(false)->addValidator('StringLength', true, array(5, 1000, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer description', Zend_Validate_StringLength::TOO_LONG => 'Your description is too long')))->setDecorators(array('Composite'));
$file = new TA_Form_Element_MagicFile('file');
$file->setLabel('Your submission (File must be pdf and no bigger than 10Mb) *')->setRequired(false)->addDecorators($this->_magicFileElementDecorator)->addValidators(array(array('Count', true, 1), array('Size', true, 10000000), array('Extension', true, array('pdf', 'case' => true)), array('MimeType', false, array('application/pdf'))));
$file->getValidator('Extension')->setMessage('Only pdf files are allowed!');
$subform = new Zend_Form_SubForm();
$subform->setDecorators(array('FormElements'));
$subform->addElements(array($type, $file, $title, $audience, $topicsel, $keywords, $abstract, $comment));
$this->addSubForm($subform, 'submission');
$this->addElement('submit', 'submit', array('label' => 'Submit', 'decorators' => $this->_buttonElementDecorator));
}
示例9: init
public function init()
{
parent::init();
$this->setAttrib('enctype', 'multipart/form-data');
$element = new Zend_Form_Element_File('filename');
$element->setLabel('Foto')->setDescription('Maximale grootte van de foto is 1mb')->setRequired(true)->setValidators(array(array('Count', false, 1), array('Size', false, 1024000), array('Extension', false, 'jpg,png,gif')))->setDestination(APPLICATION_PATH . '/../public/images/uploads/holidayhome/photos');
$this->addElement($element);
$this->addDisplayGroup(array('filename'), 'photogroup', array('legend' => 'Foto', 'class' => 'file'));
$subForm = new Zend_Form_SubForm('Translation');
foreach (Model_Hm_Lang::listAll() as $lang) {
$subSubForm = new Zend_Form_SubForm($lang->code);
$element = new Zend_Form_Element_Text('title');
$element->setLabel('Titel')->setRequired(true)->setValidators(array(array('stringLength', null, array('min' => 4, 'max' => 64))));
$subSubForm->addElement($element);
$element = new Zend_Form_Element_Textarea('description');
$element->setLabel('Omschrijving')->setAttrib('rows', 2)->setAttrib('class', 'autoexpand')->setRequired(true)->setValidators(array(array('stringLength', null, array('min' => 40))));
$subSubForm->addElement($element);
$subSubForm->addDisplayGroup(array('title', 'description'), $lang->code, array('class' => 'textarea', 'legend' => $lang->name));
$this->bhvkSubDecorators($subSubForm);
$subForm->addSubForm($subSubForm, $lang->code);
}
$this->bhvkSubDecorators($subForm);
$this->addSubForm($subForm, 'Translation');
$element = new Zend_Form_Element_Submit('photo_submit');
$element->setLabel('Verwerken')->setAttrib('class', 'submit');
$this->addElement($element);
$this->addDisplayGroup(array('photo_submit'), 'submit', array('class' => 'submit'));
$this->bhvkDecorators();
$this->bhvkDecorateSubmit('photo_submit');
$this->bhvkDecorateFile($this->getElement('filename'));
}
示例10: addTripLines
public function addTripLines($tripCount = 1, $startDate, $buses = array())
{
// create subform
$tripLinePanel = new Zend_Form_SubForm();
$tripLinePanel->setDecorators($this->_displayGroupDecorators)->addAttribs(array('class' => 'fieldsetForm span-8'));
for ($i = 1; $i <= $tripCount; ++$i) {
// create bus element
$bus = $this->_createBusElement($buses);
// create departure time element
$departureTime = $this->_createElement('text', 'departureTime', 'Ngày giờ đi', 'Làm ơn nhập ngày giờ đi', true);
$departureTime->setValue($startDate . ' 00:00:00');
$departureTime->addValidator(new TBB_Validate_DepartureTime($startDate));
// create arrival time element
$arrivalTime = $this->_createElement('text', 'arrivalTime', 'Ngày giờ đến', 'Làm ơn nhập ngày giờ đến', true);
$arrivalTime->setValue($startDate . ' 00:00:00');
$arrivalTime->addValidator(new TBB_Validate_ArrivalTime());
$fare = $this->_createElement('text', 'fare', 'Giá vé', 'Làm ơn nhập giá vé', false, true);
// create trip line
$tripLine = new Zend_Form_SubForm();
$tripLine->setDecorators($this->_displayGroupDecorators)->addAttribs(array('class' => 'span-7'))->setLegend('Chuyến #' . $i);
// add elements to the tripline
$tripLine->addElements(array($bus, $departureTime, $arrivalTime, $fare));
$tripLinePanel->addSubForm($tripLine, $i);
}
// add submit button
$submit = $this->_createSubmitButton();
$tripLinePanel->addElement($submit);
$this->addSubForm($tripLinePanel, 'tripLines');
}
示例11: addCustomVariable
protected function addCustomVariable($varname)
{
$a = new \Zend_Form_SubForm();
$a->addElement('note', 'title', array('label' => sprintf($this->translate('Custom Variable "%s"'), $varname)));
$a->addElement('text', 'description', array('label' => $this->translate('Description'), 'required' => true));
$a->addElement('text', 'default_value', array('label' => $this->translate('Default value')));
$this->addSubForm($a, 'cv_' . $varname);
}
示例12: getForm
public function getForm()
{
$form = new Zend_Form();
$form->addElement('text', 'foo')->addElement('text', 'bar')->addElement('text', 'baz')->addElement('text', 'bat');
$subForm = new Zend_Form_SubForm();
$subForm->addElement('text', 'foo')->addElement('text', 'bar')->addElement('text', 'baz')->addElement('text', 'bat');
$form->addDisplayGroup(array('foo', 'bar'), 'foobar')->addSubForm($subForm, 'sub')->setView(new Zend_View());
return $form;
}
示例13: getForm
protected function getForm()
{
$translationKey = $this->_request->getParam('key');
if (empty($translationKey)) {
throw new Application_Exception('Parameters missing');
}
$form = new Zend_Form_SubForm();
$form->addSubForm(new Setup_Form_LanguageKey($translationKey), $translationKey);
return $form;
}
示例14: init
/**
*/
public function init()
{
$this->addElement('hash', 'csrf');
$this->addElement('select', 'type', array('label' => getGS('Type'), 'required' => true, 'multioptions' => array('reuters' => 'Thomson Reuters')));
$config = new Zend_Form_SubForm();
$config->addElement('text', 'username', array('label' => getGS('Username'), 'required' => true, 'filters' => array('stringTrim')));
$config->addElement('text', 'password', array('label' => getGS('Password'), 'required' => true, 'filters' => array('stringTrim')));
$this->addSubForm($config, 'config');
$this->addElement('submit', 'submit', array('label' => getGS('Add'), 'ignore' => true));
}
示例15: indexAction
public function indexAction()
{
// action body
$idEncuesta = $this->getParam("idEncuesta");
$encuesta = $this->encuestaDAO->obtenerEncuesta($idEncuesta);
$secciones = $this->seccionDAO->obtenerSecciones($idEncuesta);
$formulario = new Zend_Form($encuesta->getHash());
//debemos agregar a este formulario campos para identificar quien es el que esta llenando esta encuesta
$eSubCabecera = new Zend_Form_SubForm();
$eSubCabecera->setLegend("Datos Personales: ");
$eEncuesta = new Zend_Form_Element_Hidden("idEncuesta");
$eEncuesta->setValue($idEncuesta);
$eReferencia = new Zend_Form_Element_Text("referencia");
$eReferencia->setLabel("Boleta o Clave : ");
$eReferencia->setAttrib("class", "form-control");
$eReferencia->setDecorators($this->decoratorsPregunta);
$eSubCabecera->addElements(array($eEncuesta, $eReferencia));
$eSubCabecera->setDecorators($this->decoratorsSeccion);
$formulario->addSubForm($eSubCabecera, "referencia");
//============================================= Iteramos a traves de las secciones del grupo
foreach ($secciones as $seccion) {
//============================================= Cada seccion es una subforma
$subFormSeccion = new Zend_Form_SubForm($seccion->getHash());
$subFormSeccion->setLegend("Sección: " . $seccion->getNombre());
//============================================= Obtenemos los elemntos de la seccion
$elementos = $this->seccionDAO->obtenerElementos($seccion->getIdSeccion());
foreach ($elementos as $elemento) {
//============================================= Verificamos que tipo de elemento es
if ($elemento instanceof Encuesta_Model_Pregunta) {
//============================================= Aqui ya la agregamos a la seccion
$this->agregarPregunta($subFormSeccion, $elemento);
} elseif ($elemento instanceof Encuesta_Model_Grupo) {
//============================================= un grupo es otra subform
$subFormGrupo = new Zend_Form_SubForm($elemento->getHash());
$subFormGrupo->setLegend("Grupo: " . $elemento->getNombre());
$preguntasGrupo = $this->grupoDAO->obtenerPreguntas($elemento->getIdGrupo());
foreach ($preguntasGrupo as $pregunta) {
//============================================= Aqui ya la agregamos al grupo
$this->agregarPregunta($subFormGrupo, $pregunta);
}
$subFormGrupo->setDecorators($this->decoratorsGrupo);
$subFormSeccion->addSubForm($subFormGrupo, $elemento->getIdGrupo());
}
}
$subFormSeccion->setDecorators($this->decoratorsSeccion);
$formulario->addSubForm($subFormSeccion, $seccion->getIdSeccion());
}
$eSubmit = new Zend_Form_Element_Submit("submit");
$eSubmit->setLabel("Enviar Encuesta");
$eSubmit->setAttrib("class", "btn btn-success");
$formulario->addElement($eSubmit);
$formulario->setDecorators($this->formDecorators);
$this->view->encuesta = $encuesta;
$this->view->formulario = $formulario;
}