11 Replies Latest reply on May 11, 2015 10:42 AM by jasonz82977625

    auto fill not working correctly

    jasonz82977625 Level 1

      I setup two drop downs and set the up to auto fill some text fields they all have unique name

      i have 7 text fields for each drop down to fill

      Like Data_Field_1 or Field_Data_2


      Box one is set to fill Data_Field_1

      Box 2 is set to fill Field_Data_2


      when i pick something from box one it fill Field_Data_2

      when i pick something from box 2 it fills Data_Field_1


      if select something from the drop down 3-4 times it will fill in the correct data


      this is what i have set to the drop down box and then changed Data_Field to  Field_Data_2 for the other one and did fill as Teat 1

      set as a Keystroke


      if( event.willCommit ) {

          if(event.value == "") this.resetForm(

          ["Data_Field_1", "Data_Field_2", "Data_Field_3", "Data_Field_4", "Data_Field_5", "Data_Field_6", "Data_Field_7" ]); else SetFieldValues(event.value);




      and i have this set as a run custom validation script


      var FillData = {

      "Select 1 " :{Data_Field_1: "Option 1", Data_Field_2: "Option 2", Data_Field_3: "Option 3", Data_Field_4: "Option 4", Data_Field_5: "Option 5", Data_Field_6: "Option 6", Data_Field_7: "Option 7"   },

      " Select 2" :{Data_Field_1: "Option 7", Data_Field_2: "Option 6", Data_Field_3: "Option 5", Data_Field_4: "Option 4", Data_Field_5: "Option 3", Data_Field_6: "Option 2", Data_Field_7: "Option 1"   }



      function SetFieldValues(cFillData) {


          this.getField("Data_Field_1").value = FillData[cFillData].Data_Field_1;

          this.getField("Data_Field_2").value = FillData[cFillData].Data_Field_2;

          this.getField("Data_Field_3").value = FillData[cFillData].Data_Field_3;

          this.getField("Data_Field_4").value = FillData[cFillData].Data_Field_4;

          this.getField("Data_Field_5").value = FillData[cFillData].Data_Field_5;

          this.getField("Data_Field_6").value = FillData[cFillData].Data_Field_6;

          this.getField("Data_Field_7").value = FillData[cFillData].Data_Field_7;