1 Reply Latest reply on Nov 2, 2017 2:06 AM by try67

    Dropdown populate field, make field editable

    sarahp26444118

      I have a form which I have created that has a custom calculation script that fills a text field with a different line of text depending on a selection from a dropdown menu. I have this working well but I want to know id there a way that I can make the text editable after a selection is made as minor details may need to be changed.

      This is my code:

      var v1 = this.getField("Dropdown36").valueAsString;

      var v2 = this.getField("Dropdown38").valueAsString;

      var val = "";

       

       

      if (v1=="limited") {

        if (val.length > 0) val = val + "\n";

        val = val + "limited number outcome";

      }

       

       

      if (v1=="basic") {

        if (val.length > 0) val = val + "\n";

        val = val + "basic number outcome";

      }

      if (v1=="sound") {

        if (val.length > 0) val = val + "\n";

        val = val + "sound number outcome";

      }

       

       

      if (v1=="high") {

        if (val.length > 0) val = val + "\n";

        val = val + "high number outcome";

      }

       

       

      if (v1=="outstanding") {

        if (val.length > 0) val = val + "\n";

        val = val + "outstanding number outcome";

      }

       

      if (v2=="limited") {

        if (val.length > 0) val = val + "\n";

        val = val + "limited measurement outcome";

      }

       

       

      if (v2=="basic") {

        if (val.length > 0) val = val + "\n";

        val = val + "-basic measurement outcome";

      }

      if (v2=="sound") {

        if (val.length > 0) val = val + "\n";

        val = val + "- sound measurement outcome";

      }

       

      if (v2=="high") {

        if (val.length > 0) val = val + "\n";

        val = val + "high measurement outcome";

      }

       

      if (v2=="outstanding") {

        if (val.length > 0) val = val + "\n";

        val = val + "outstanding measurement outcome";

      }

       

      event.value = val;

       

      Thanks very much