2 Replies Latest reply on Aug 31, 2013 7:40 PM by M.Su

    Multiline Text Field With Combobox


      This script is what I am currently using to populate a text field with the selection from a combobox.


      this.getField("myTextField").value = event.value;


      Is there a script that can do the same but from the text field rather than the combobox?

      I have three comboboxes whose selections need to be on new lines in the same mulitline text field.

      Would something in the format below be possible?


      if (event.value!="") {event.value = this.getField("A").value;}

      [Line Break]

      if (event.value!="") {event.value = this.getField("B"),value;}

      [Line Break]

      if (event.value!="") {event.value = this.getField("C").value;}



      Also, is there a way to permanaently set the multiline text field's line alignment to center with a specific leading?



      Thank you in advance.

        • 1. Re: Multiline Text Field With Combobox
          gkaiseril MVP & Adobe Community Professional

          Have you tried any script?


          Your script will only add the value of the first field because once that value is added to the field, then the field is no longer empty.


          You need to include the new line or return character within the string value being  placed in the field.


          How do you want a missing value to be handled?


          You could use the following script for the text field:


          // get the fie value of field A;


          evnen.value = this.getField("A").value;

          event,value = event.value + "\n"; // add new line

          event.value = event.value+ this.getField("B").value; // field B;

          event,value = event.value + "\n"; // add new line

          event.value = event.value+ this.getField("C").value; // field C;

          • 2. Re: Multiline Text Field With Combobox
            M.Su Level 1

            For missing values, I would want the text field to disregard it and show the next value. (I.e. Only two lines rather than three)

            In terms of missing values, can it also apply to when a selection is not made? (User leaves the default text)


            Can it also be modified so that the values are commited automatically? At the moment, the text field does not reflect changes in the selected values until the text field is reset.