7 Replies Latest reply on Dec 13, 2017 4:30 PM by Thom Parker

    Javascript for conditionally requiring radio buttons to be checked


      I am creating a PDF form that consists of several yes and no questions (with radio buttons) and I am trying to conditionally require subquestions (if yes is checked).  My question is Group1c, my subquestion is Subgroup1c.  My answer choices for Group1c are Yes and No.  All are radio buttons.  My first question is already marked required, and my subquestion should be conditionally required.  I tried the following code, but it keeps returning an error.  Please advise!  Thank you!



      var f = this.getField("Group1c");


      var yes = this.getField("Yes");


      yes.required = false;


      if(f.value === "Yes") {

      Subgroup1c.required = true;