1

I am trying to disable a checkboxes in magento. But It's not working.

        $fieldset->addField(
            'checkstatus', 'checkboxes', array('Select Status')
            'label' => $this->__(',
            'name' => 'checkstatus[]',
            'values' => $options,
            'checked' => $optionselected,
            'disabled'=> true,
            'readonly'=>true
            )
        );

Could you please help me in this

1

disabled this will work for single checkbox for multiple checkbox you can add 'disabled' => array(//your values array),

$fieldset->addField(
            'checkstatus', 'checkboxes', array(
            'label' => $this->__('Select Status'),
            'name' => 'checkstatus[]',
            'values' => $options,
            'checked' => $optionselected,
            ''disabled' => $options,
            'readonly'=>true
            )
        );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.