My initial plan was to use a hidden field and make it validate based on what was checked on the radio buttons.
I tried to get the values of the radio buttons using the javascript from the library provided by Dynamic Forms namely the funcRadioCalc function.
It seemed like it would work from reading your example 20 from your site, but it would allways error with no object found when calling funcRadioCalc($(Plans_FieldID))).
I did a little more digging and it turns out that the $(Plans_Field) wasn't returning the correct name of radio group, it was using _ instead of $ for the part of the radio button name.
dnn_ctr465_DynamicForms_Responses_ca2433c9-0105-40db-9c10-fda97a9b1798
(this is what was passed when using $(Plans_Field) )
vs
dnn$ctr465$DynamicForms$Responses_ca2433c9-0105-40db-9c10-fda97a9b1798
(This is what radio button group was using for name)
So I changed the function per below;
/***********************************************
* This function call is used to return the value of a radio button. This function can be called for using calculations with radio buttons
* Example use: funcRadioCalc($(ShortFieldName_FieldID))
***********************************************/
function funcRadioCalc(RadioName)
{
var str=RadioName;
var strlen=str.length;
var str1=str.substring(0,str.indexOf("Responses"));
var str2=str.substring(str.indexOf("Responses"),strlen);
str1=str1.replace(/_/gi, "$");
str=str1.concat(str2);
var chkList1= document.getElementById (str);
var arrayOfCheckBoxes= chkList1.getElementsByTagName("input");
for(var i=0;i<arrayOfCheckBoxes.length;i++)
{
if (arrayOfCheckBoxes[i].checked) {
return arrayOfCheckBoxes[i].value;
}
}
}
This fixed the issue with function not working correctly.
I still think it would be possible to do what I was wanting to do with javascript , a hidden required field and validate it with something like a 0 or 1 for the value changed via javascript.
Not sure if this above fix to the javascript would work for anyone else that might be having the problem or is this issue fixed in a newer release?
We have release Dynamic Forms Version: 4.0.10.36827.