yii2-widget-activeform
yii2-widget-activeform copied to clipboard
ActiveField enhancement
I wonder if you would consider the following enhancement. It is an alteration to the protected function initDisability(&$options) in ActiveField.php The following will disable any attributes which are not active. I am using this to automatically disable unavailable fields as defined in scenarios.
$model = $this->model; if (!in_array($this->attribute, $model->activeAttributes())) { $options['disabled'] = true; }
Thanks for you time