Skip to main content

Anyone know of a good way to validate that a Radio Button Group has one option selected on a button click event?  The form passes validation condition seems to be skipping over that control type.

Hello,


 


In order to have the condition "If the form passes validation" to work, you will need to have set validation patterns on the controls. However, radio buttons can not have a validation pattern added to them.  Only the following controls can have validation patterns:


 



  • Data Label
  • Text Area
  • Text Box

So to do validation for these controls you would probably need to use other conditions. I am not sure what exactly you are trying to validate but you can check whether or not the radio button has a value. Use the condition "A control on a view does not contain a value" or "A control on the Form does not contain a value". This would tell you whether or not someone has selected that button. If you need to validate on at least one button being selected this might be a good configuration.


 


Here is some documentation on validation patterns if you are interested:


http://help.k2.com/onlinehelp/k2forsharepoint/UserGuide/current/default.htm#Using_a_Validation_Pattern_and_Rule_Condition.html


 


Adding validation patterns for other controls may be a good feature request, I would recommend contacting K2 Support if you would like to suggest it to them.


 


Regards,


Evan


@JasonD1 The 'If the View/Form passes validation' condition works on a Radio Button Group as long as each radio button in the group has a Value set in its properties, as per the following documentation:


 


"3. When using the control in advanced conditions or data transfer for example, the Value property of the grouped Radio Buttons need to be set and unique so the Radio Button Group control can determine its specific value within the Group control."


 


16240iD88684F251BDE3FD.png


Reply