3 Replies Latest reply on May 18, 2012 12:51 PM by 01371406

    If then statement for forms

    Wendie Lubic

      I have created a form filled with true/false questions. I can get the form to subtotal the answers into a box that I will keep invisible. I need to write a script that in essence says that if the field "Total" is less than 7, then letter "I" should appear. If the number is more than 7, then it should be an "E".


      I have tried a million variations, using "document.write" and "event.value" and I just can't get it to work.



      var nTotal = this.getField("Total").value;

      if (nTotal > 7) document.write("I");

      else document.write("E");


      Thanks for any help you can give me!