Protected Member Functions | |
_prepareForm () |
Definition at line 35 of file Form.php.
_prepareForm | ( | ) | [protected] |
Prepare form before rendering HTML
Reimplemented from Mage_Adminhtml_Block_Widget_Form.
Definition at line 37 of file Form.php.
00038 { 00039 $form = new Varien_Data_Form(); 00040 00041 $fieldset = $form->addFieldset('add_answer_form', array('legend' => Mage::helper('poll')->__('Add New Answer'))); 00042 00043 $fieldset->addField('answer_title', 'text', array( 00044 'name' => 'answer_title', 00045 'title' => Mage::helper('poll')->__('Answer Title'), 00046 'label' => Mage::helper('poll')->__('Answer Title'), 00047 'maxlength' => '255', 00048 'no_span' => true, 00049 ) 00050 ); 00051 00052 $fieldset->addField('poll_id', 'hidden', array( 00053 'name' => 'poll_id', 00054 'no_span' => true, 00055 'value' => $this->getRequest()->getParam('id'), 00056 ) 00057 ); 00058 00059 $fieldset->addField('add_button', 'note', array( 00060 'text' => $this->getLayout()->createBlock('adminhtml/widget_button') 00061 ->setData(array( 00062 'label' => Mage::helper('poll')->__('Add Answer'), 00063 'onclick' => 'answers.add();', 00064 'class' => 'add', 00065 ))->toHtml(), 00066 'no_span' => true, 00067 ) 00068 ); 00069 00070 $this->setForm($form); 00071 }