Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dicrtarasov opened this issue Feb 24, 2020 · 0 comments
Labels

Comments

@dicrtarasov
Copy link

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 :(

@samdark samdark added the type:bug Bug label Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants