Page 1 of 1
RadioButtons Validation
Posted: 11 Sep 2014
by schuess
How can I can i complete JS validation for a field of Type RadioButtons?
Thanks!
Re: RadioButtons Validation
Posted: 12 Sep 2014
by Dmitry Kozlov
Hi,
What kind of validation do you need to implement? You can make field mandatory in its settings: List settings -> Columns.
Re: RadioButtons Validation
Posted: 12 Sep 2014
by schuess
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.
Re: RadioButtons Validation
Posted: 15 Sep 2014
by Dmitry Kozlov
OK, I see. Here is the code you should add into
onsubmit handler:
Code: Select all
if (fd.field('ChoiceRadio').value() == -1) {
alert('Please, make a choice');
return false;
}
return true;
Re: RadioButtons Validation
Posted: 16 Sep 2014
by schuess
That worked great. THanks for your help.
Re: RadioButtons Validation
Posted: 21 Sep 2016
by lijupnandanan
Hi
I get radiobutton value from this
fd.field('FieldName').value()
but how can I get radio button text?
Re: RadioButtons Validation
Posted: 22 Sep 2016
by YuriyMedvedev