RadioButtons Validation
Posted by schuess - Sep 11 ’14 at 02:11
How can I can i complete JS validation for a field of Type RadioButtons?
Thanks!
-
Dmitry KozlovAdminMember for: 6 years 2 months 26 days
Hi,
What kind of validation do you need to implement? You can make field mandatory in its settings: List settings -> Columns.
-
schuessMemberMember for: 5 years 10 months 22 days
I know I could just make all of the fields i wanted madatory from the list column settings, however i was going down a path of doing all of my field requirements with JS.
I have a field of type Radio that has 2 choices. I just want to make sure a choice is made.
-
Dmitry KozlovAdminMember for: 6 years 2 months 26 days
[#2]: OK, I see. Here is the code you should add into onsubmit handler:
if (fd.field('ChoiceRadio').value() == -1) { alert('Please, make a choice'); return false; } return true;
-
schuessMemberMember for: 5 years 10 months 22 days
That worked great. THanks for your help.
-
lijupnandananMemberMember for: 3 years 8 months 3 days
Hi
I get radiobutton value from this
fd.field('FieldName').value()
but how can I get radio button text?
-
Yuriy MedvedevModeratorMember for: 3 years 3 months 17 days
[#5]: http://forum.spform.com/forms-designer-for-sharepoint-20/nake-fields-mandatory-using-a-radio-button-36630/#msg4 answer is here