Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In your Admin controller </p> <p>please see <strong>editAction</strong></p> <pre><code>$this-&gt;_addContent($this-&gt;getLayout()-&gt;createBlock('&lt;module&gt;/adminhtml_&lt;module&gt;_edit')) -&gt;_addLeft($this-&gt;getLayout()-&gt;createBlock('&lt;module&gt;/adminhtml_&lt;module&gt;_edit_tabs')); </code></pre> <p>remove </p> <pre><code>-&gt;_addLeft($this-&gt;getLayout()-&gt;createBlock('&lt;module&gt;/adminhtml_&lt;module&gt;_edit_tabs')); </code></pre> <p>then create file name form.php in</p> <p>app/code/community/namespace/test/Block/Adminhtml/test/Edit/Form.php</p> <p>and paste the code in</p> <pre><code>class &lt;Namespace&gt;_&lt;Module&gt;_Block_Adminhtml_&lt;Module&gt;_Edit_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $&lt;module&gt;Form = new Varien_Data_Form(array( 'id' =&gt; 'edit_form', 'action' =&gt; $this-&gt;getUrl('*/*/save', array('id' =&gt; $this-&gt;getRequest()-&gt;getParam('id'))), 'method' =&gt; 'post', )); $&lt;module&gt;Form-&gt;setUseContainer(true); $this-&gt;setForm($&lt;module&gt;Form); $fieldset = $&lt;module&gt;Form-&gt;addFieldset('&lt;module&gt;_form', array( 'legend' =&gt; Mage::helper('&lt;module&gt;')-&gt;__('Item Information'), 'class' =&gt; 'fieldset-wide', ) ); $fieldset-&gt;addField('&lt;module&gt;_name', 'text', array( 'label' =&gt; Mage::helper('&lt;module&gt;')-&gt;__('Name'), 'class' =&gt; 'required-entry', 'required' =&gt; true, 'name' =&gt; 'name', )); if ( Mage::getSingleton('adminhtml/session')-&gt;get&lt;Module&gt;Data() ) { $&lt;module&gt;Form -&gt; setValues(Mage::getSingleton('adminhtml/session')-&gt;get&lt;Module&gt;Data()); Mage::getSingleton('adminhtml/session')-&gt;get&lt;Module&gt;Data(null); } elseif ( Mage::registry('&lt;module&gt;_data') ) { $&lt;module&gt;Form-&gt; setValues(Mage::registry('&lt;module&gt;_data')-&gt;getData()); } return parent::_prepareForm(); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload