在magento管理员端添加自定义表单

时间:2013-03-11 10:40:28

标签: forms magento admin magento-1.7

我想在magento中使用两个部分(两个绿色框)

制作自定义表单

There is 2 green part I want to make in admin

我也想制作三个字段,而不是像

一样

one label and three fields like DD-MM-YYYY

我已经制作了类似

的代码
protected function _prepareForm() {
        $form = new Varien_Data_Form();
        $this->setForm($form);
        $fieldset = $form->addFieldset('slider_form', array('legend' => Mage::helper('slider')->__('Slider information')));

        $fieldset->addField('link_title', 'text', array(
            'label' => Mage::helper('slider')->__('Link Title'),
            'class' => 'required-entry',
            'required' => true,
            'name' => 'link_title',
        ));
        $fieldset->addField('link', 'text', array(
            'label' => Mage::helper('slider')->__('Link'),
            'class' => 'required-entry',
            'required' => true,
            'name' => 'link',
        ));

        $fieldset->addField('content', 'text', array(
            'label' => Mage::helper('slider')->__('Text'),
            'class' => 'required-entry',
            'required' => true,
            'name' => 'content',
        ));

       ....
       ....
}

任何人都可以帮忙!!!

0 个答案:

没有答案