diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 163fd91..a07e2db 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -69,6 +69,7 @@ Yii Framework 2 Change Log - Bug #4241: `yii\widgets\Pjax` was incorrectly setting container id (mitalcoi) - Bug #4276: Added check for UPLOAD_ERR_NO_FILE in `yii\web\UploadedFile` and return null if no file was uploaded (OmgDef) - Bug #4342: mssql (dblib) driver does not support getting attributes (tof06) +- Bug #4371: Active form client validation wasn't working in case of two models having same named fields (abrahamy) - Bug #4409: Upper case letters in subdirectory prefixes of controller IDs were not properly handled (qiangxue) - Bug #4412: Formatter used SI Prefixes for base 1024, now uses binary prefixes (kmindi) - Bug #4427: Formatter could do one division too much (kmindi) diff --git a/framework/widgets/ActiveField.php b/framework/widgets/ActiveField.php index 636db97..565d222 100644 --- a/framework/widgets/ActiveField.php +++ b/framework/widgets/ActiveField.php @@ -195,7 +195,7 @@ class ActiveField extends Component { $clientOptions = $this->getClientOptions(); if (!empty($clientOptions)) { - $this->form->attributes[$this->attribute] = $clientOptions; + $this->form->attributes[Html::getInputId($this->model, $this->attribute)] = $clientOptions; } $inputID = Html::getInputId($this->model, $this->attribute);