Mage_Adminhtml_Block_Poll_Answer_Edit_Form Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Poll_Answer_Edit_Form:

Mage_Adminhtml_Block_Widget_Form Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Protected Member Functions

 _prepareForm ()


Detailed Description

Definition at line 35 of file Form.php.


Member Function Documentation

_prepareForm (  )  [protected]

Prepare form before rendering HTML

Returns:
Mage_Adminhtml_Block_Widget_Form

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('edit_answer_form', array('legend' => Mage::helper('poll')->__('Edit Poll 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                     'required'  => true,
00048                     'class'     => 'required-entry',
00049                 )
00050         );
00051 
00052         $fieldset->addField('votes_count', 'text', array(
00053                     'name'      => 'votes_count',
00054                     'title'     => Mage::helper('poll')->__('Votes Count'),
00055                     'label'     => Mage::helper('poll')->__('Votes Count'),
00056                     'class'     => 'validate-not-negative-number'
00057                 )
00058         );
00059 
00060         $fieldset->addField('poll_id', 'hidden', array(
00061                     'name'      => 'poll_id',
00062                     'no_span'   => true,
00063                 )
00064         );
00065 
00066         $form->setValues(Mage::registry('answer_data')->getData());
00067         $form->setUseContainer(true);
00068         $form->setId('edit_form');
00069         $form->setMethod('post');
00070         $form->setAction($this->getUrl('*/*/save', array('id' => Mage::registry('answer_data')->getAnswerId())));
00071         $this->setForm($form);
00072     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:53 2009 for Magento by  doxygen 1.5.8