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

Cactiveform Radiobuttonlist Required not working properly on clientValidation #2238

Closed
mvdnbrk opened this issue Mar 21, 2013 · 1 comment
Closed

Comments

@mvdnbrk
Copy link
Contributor

mvdnbrk commented Mar 21, 2013

when adding a radioButtonList to my form client validation keeps saying that the value can not be blank although you have selected an option.

for example my HTML renders as follows:

<input id="Account_gender_0" value="M" type="radio" name="Account[gender]"> <input id="Account_gender_1" value="F" type="radio" name="Account[gender]">

looks like the problem is in jquery.yiiactiveform.js
It will look for inputID and inputID is set to Account_gender.
The appendix _0 and _1 are not taken into consideration so it will fail to find the selected value.

See also this thread:
http://www.yiiframework.com/forum/index.php/topic/41551-cactiveform-radiobuttonlist-required-giving-errors

@mdomba
Copy link
Member

mdomba commented Mar 22, 2013

Please post your view code for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants