yii2-bootstrap4 icon indicating copy to clipboard operation
yii2-bootstrap4 copied to clipboard

field id attribute placed on incorrect element for custom-control fields

Open dicrtarasov opened this issue 5 years ago • 0 comments

class TestModel extends Model
{
    public $myfield;
}

$model = new TestModel(['myfield' => 1]);
$form = ActiveForm::begin();
echo $form->field($model, 'myfield')->radioList([    1 => 1, 2 => 2]);

Produce this HTML: img

Where id attribute is placed on div, but yii.validation.js working with input by id. This marking is not supported by yii.validation.js and activeform.js.

Client-side validation not working with such fields :(

dicrtarasov avatar Feb 24 '20 09:02 dicrtarasov