2 Replies Latest reply on Sep 12, 2013 12:14 PM by millerjudi

    Need help with javascript used to check for data in required fields


      I keep getting a syntax error (SyntaxError: missing : after property id 17; at line 18).  I'm trying to run a script to check for data in all the required radio button fields before letting the user submit the form (or save it).  Here's the code I'm using:


      var AllRequiredFieldsSet = true;

      for(var i=0; i<this.numFields;i++)//loop through all form fields


                     var fldName=this.getNthFieldName;

                     var currentFld= this.getField(fldName);



                                    //All radios are required so see if user filled them out


                                                   AllRequiredFieldsSet = false;//one of the radio buttons has not been selected so form can't be submitted



      if (AllRequiredFieldsSet==false)

                     app.alert("All required fields have not been completed");


      this.submitForm({cURL "mailto:EMAILADDRESS@gmail.com", cSubmitAs: "PDF"});


      I'm not missing any brackets...Any ideas as to what I'm missing?


      Thanks! Judy