简体   繁体   English

如何在Magento表单中默认启用状态字段?

[英]How to Make a Status Field Bydefault Enable in Magento Form?

Following is my Form Field Code. 以下是我的表单域代码。

$fieldset->addField('status','select', 
    array(
    'label'  => Mage::helper('synclogin')->__('Eshot Status'),
    'name'   => 'status',
    'values' => array(
        array(
        'value' => 0,
        'label' => Mage::helper('synclogin')->__('Disabled'),
        ),
         array(
        'value' => 1,
        'label' => Mage::helper('synclogin')->__('Enabled'),
       ),
    ),
    )
);

How to Make a Status Field Bydefault Enable in Magento Form? 如何在Magento表单中默认启用状态字段?

$fieldset->addField('status','select', array( 'label' => Mage::helper('synclogin')->__('Eshot Status'), 'name' => 'status', 'value' => '1', 'values' => array( array( 'value' => 0, 'label' => Mage::helper('synclogin')->__('Disabled'), ), array( 'value' => 1, 'label' => Mage::helper('synclogin')->__('Enabled'), ), ), ) );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM