public function testCanSetArrayFlag() { $this->testFormIsNotAnArrayByDefault(); $this->form->setIsArray(true); $this->assertTrue($this->form->isArray()); $this->form->setIsArray(false); $this->assertFalse($this->form->isArray()); }
public function getForm($includeSubmit = false) { if ($this->_campaignForm instanceof Zend_Form) { $form = $this->_campaignForm; } else { $form = new Zend_Form(); $form->setIsArray(true); $form->addElement('hidden', 'id'); $form->addElement('text', 'name', array('label' => 'Campaign')); $nameField = $form->getelement('name'); $nameField->setRequired(true); $this->_campaignForm = $form; $this->_populateForm(); $form = $this->_campaignForm; } if ($includeSubmit) { $form->addElement('submit', 'submit'); } return $form; }
public function getForm($includeSubmit = false) { if ($this->_mediaForm instanceof Zend_Form) { $form = $this->_mediaForm; } else { $form = new Zend_Form(); $form->setIsArray(true); $form->addElement('hidden', 'id'); $form->addElement('text', 'name', array('label' => 'media')); $this->_mediaForm = $form; $this->_populateForm(); $form = $this->_mediaForm; } if ($includeSubmit) { $form->addElement('submit', 'submit'); } return $form; }
public function getForm($includeSubmit = false) { if ($this->_sessionForm instanceof Zend_Form) { $form = $this->_sessionForm; } else { $form = new Zend_Form(); $form->setIsArray(true); $form->addElement('hidden', 'id'); $form->addSubForm($this->campaign->getForm(), 'campaign'); $form->addElement('text', 'date', array('label' => 'Date')); $form->addElement('text', 'description', array('label' => 'Description')); $form->addElement('text', 'synopsis', array('label' => 'Synopsis')); $form->addElement('text', 'tags', array('label' => 'Tags')); $this->_sessionForm = $form; $this->_populateForm(); $form = $this->_sessionForm; } if ($includeSubmit) { $form->addElement('submit', 'submit'); } return $form; }