2 Replies Latest reply on May 29, 2014 4:51 PM by nedsemp

    Drop down menu auto-populates but wont update if you change selection?

    nedsemp

      Hi All,

       

      I am having an issue with auto populating a text field based on the selection from a drop down box. Whilst the script works in the first instance, if I go back and change my selection the result/calculations don't update based on the new selection.

       

      I have used the following script to auto populate a text field (titled 'stndwatt') based off the drop down menu selection. The drop down field is titled 'ProductLineOne':

       

      var v = this.getField("ProductLineOne").value;

      if (v=="3000K T10 (Tube)") event.value = "21";

      else if (v=="4000K T10 (Tube)") event.value = "21";

      else if (v=="5000K T10 (Tube)") event.value = "21";

      else if (v=="6000K T10 (Tube)") event.value = "21";

      else if (v=="HBZ (100W Bay)") event.value = "100";

      else if (v=="HBZ (150W Bay)") event.value = "150";

      else if (v=="HBZ (200W Bay)") event.value = "200";


      The text field ('stndwatt') is actually hidden and is purely required to form part of other subsequent calculations - I don't know if this is a factor?


      If you could please advise what I can do to make the field update when a new selection is made from the drop down box it would be very much appreciated!

       

      I'm just a beginner so please keep this in mind

       

      Thanks!!!