kartik-v / yii2-widgets

Collection of useful widgets for Yii Framework 2.0
http://demos.krajee.com/widgets
Other
558 stars 175 forks source link

How to disable depdrop #293

Closed Francogo closed 8 years ago

Francogo commented 8 years ago

Hi, My issue is a question. I'm looking for a way to disabled(ie grey) the select2 depdrop in some condition. When "disabled" the dropdown should show the current value and drop down should be disabled. I did try to add the 'disabled'=>true in many places without success. François

kartik-v commented 8 years ago

Render a normal dropdownList or HTML Select with disabled set to true, instead of using DepDrop widget for your use case.

moysoft commented 4 years ago

It's useful to have a disabled state for the DepDrop component. For example if the state is closed then all of the form fields automatically disabled, it's funny if the user can alter the field that's already closed.