Open bscheshirwork opened 4 years ago
Thanks for posting in our issue tracker. In order to properly assist you, we need additional information:
Thanks!
This is an automated comment, triggered by adding the label status:need more info
.
1.add field to activeForm 2.redefine id in options
<?= $form->field($model, $attribute = 'is_matching_registration')->checkbox([
'id' => $idPrefix . '-' . $attribute,
]); ?>
3 fill errors with new id from js
form.yiiActiveForm('updateMessages', data.error.messages, true);
note: in https://github.com/yiisoft/yii2/blob/master/framework/assets/yii.activeForm.js
data = $form.data('yiiActiveForm'),
representation of field have original ID, not id from options
Isn't data = $form.data('yiiActiveForm'),
supposed to use names, not IDs?
attributes use id for any case I think https://github.com/yiisoft/yii2/blob/eb7b23d117664ee61ab08c15072ee1a3fa01ef66/framework/assets/yii.activeForm.js#L478-L487
What steps will reproduce the problem?
What is the expected result?
errors fill to checkbox
What do you get instead?
id for js is not redefine id: "relativeaddressofregistration-settlement" input: "#relative-0-addressofregistration-settlement" error not fill to field
Additional info