kartik-v / yii2-widget-activeform

Enhanced Yii2 active-form and active-field with full bootstrap styling support (sub repo split from yii2-widgets).
http://demos.krajee.com/widget-details/active-form
Other
64 stars 35 forks source link

itemOptions in radioButtonGroup and checkboxButtonGroup are discarded #82

Closed vercotux closed 8 years ago

vercotux commented 8 years ago

There is no way to influence <input> tag attributes within radio and checkbox button groups, other than completely rewriting the entire 'item' callback function which renders everything including the labels. In most use cases we only want to add 1 simple attribute, but we are forced to copy and modify the whole 'item' callback every time.

See: https://github.com/kartik-v/yii2-widget-activeform/blob/52b4db751e80440816f392b682d75f6f8f6585cb/ActiveField.php#L1440

It would be much better if the default $opts were merged with 'itemOptions'.