13 Replies Latest reply on Feb 9, 2016 1:36 PM by R_Mindali83

    Delay in making fields required/visible

    R_Mindali83 Level 1

      All,

       

      I have input code into my PDF form so that adjacent fields become visible/required based on the user putting in any characters in the prior field. The issue I'm finding is that there is a delay in that if you enter a character in the first cell and tab out nothing becomes required. However, if you go back into that cell and tab out again the fields become required/visible as desired.

       

      What could cause this delay and how can it be fixed? Here is my coding:

       

       

      var a = this.getField("Service/Asset Description 2");

      var b = this.getField("Currency2");

      var c = this.getField("GROSS COSTRow2");

      var d = this.getField("Sales Tax/VAT Percentage 2");

      var e = this.getField("Sales Tax/VAT Amount 2");

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

       

       

      if (a.value.length < 1) {

      b.required = false;

      b.display = display.hidden;

      c.required = false;

      c.display = display.hidden;

      d.required = false;

      d.display = display.hidden;

      e.required = false;

      e.display = display.hidden;

      f.required = false;

      f.display = display.hidden;

      c.value = ""

      d.value = ""

      e.value = ""

      }

      else {

      b.value = this.getField("Currency1").value;

      b.display = display.visible;

      b.readonly = true;

      c.required = true;

      c.display = display.visible;

      d.required = true;

      d.display = display.visible;

      e.required = true;

      e.display = display.visible;

      f.required = true;

      f.display = display.visible;

      }


      Thank you.