How can one add a disabled attribute to an input field in dynamic row system ref: https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/dynamic-row-system-config.html

What I've tried:

$this->addColumn('price', ['label' => __('Price'), 'class' => 'required-entry', 'disabled' => true]);

I would think that this would add the attribute disabled with value true. But it doesn't

Anyone any ideas?

1 Answer 1


You can try this:

        $this->addColumn('price', ['label' => __('Price'), 'style'=>'pointer-events: none; background: #CCC; color: #333; border: 1px solid #666 ']);

It's not the answear you need, but it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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