Created
January 25, 2014 15:37
-
-
Save xcommerce-gists/8618162 to your computer and use it in GitHub Desktop.
Sample Magento administrative edit form block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* News List admin edit form block | |
* | |
* @author Magento | |
*/ | |
class Magentostudy_News_Block_Adminhtml_News_Edit_Form extends Mage_Adminhtml_Block_Widget_Form | |
{ | |
/** | |
* Prepare form action | |
* | |
* @return Magentostudy_News_Block_Adminhtml_News_Edit_Form | |
*/ | |
protected function _prepareForm() | |
{ | |
$form = new Varien_Data_Form(array( | |
'id' => 'edit_form', | |
'action' => $this->getUrl('*/*/save'), | |
'method' => 'post', | |
'enctype' => 'multipart/form-data' | |
)); | |
$form->setUseContainer(true); | |
$this->setForm($form); | |
return parent::_prepareForm(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment