如何在Magento中为表单字段设置默认选择值?

时间:2014-04-19 06:53:25

标签: php magento

$ status = Mage :: helper('sliders') - > getIsActiveOptionArray();

    $fieldset->addField('is_active', 'select', array(
            'label'     => Mage::helper('sliders')->__('Status'),
            'required'  => true,
            'name'      => 'is_active',
            'values'    => $status
    ));

1 个答案:

答案 0 :(得分:0)

$status = array('-1'=>'Please Select..','1' => 'Option1','2' => 'Option2', '3' => 'Option3')