I am using the javascript API qforms for all of my form validation. Is there a way to see if a check box is checked in qforms and if it is make a radio group and a textfield required? Here is my checkbox code.
<input type="checkbox" name="arfedemployee" value="1" />
these are the form elements I want to make required if arfedemployee is checked.
<input type="radio" name="artermofaccess" value="1" />
<input type="radio" name="artermofaccess" value="0" />
<input type="text" name="arhowlongdetail">
Here is the code after the closing form tag
<SCRIPT LANGUAGE="JavaScript">
<!--//
objForm = new qForm("form1");
//not sure how to code this
if{(document.arfedemployee.form1 IS Checked)
objForm.artermofaccess.required = true;
objForm.arhowlongdetail.required = true;
}
//-->
</SCRIPT>
<input type="checkbox" name="arfedemployee" value="1" />
these are the form elements I want to make required if arfedemployee is checked.
<input type="radio" name="artermofaccess" value="1" />
<input type="radio" name="artermofaccess" value="0" />
<input type="text" name="arhowlongdetail">
Here is the code after the closing form tag
<SCRIPT LANGUAGE="JavaScript">
<!--//
objForm = new qForm("form1");
//not sure how to code this
if{(document.arfedemployee.form1 IS Checked)
objForm.artermofaccess.required = true;
objForm.arhowlongdetail.required = true;
}
//-->
</SCRIPT>