2 Replies Latest reply on Apr 24, 2015 6:15 AM by Splatt

    Help appending textfield with dropdown chooses

    Splatt

      I have PDF with a dropdown field called "SoftwareList" with a default value of "Select Software" and a text field called "SelectedSoftware". You can freely type in the text field to communicate your needs, or choose for the dropdown. I am looking to add to the text field what is selected in the dropdown each time. I had the following script accomplishing this as a custom calculation script on the text field:

       

      if (this.getField("SoftwareList").value != "Select Software")

      {

      this.getField("SelectedSoftware").value += this.getField("SoftwareList").value + ", "

      }

       

      The problem I have is that it will continue to add to the text field with whatever was chosen last in the dropdown when other fields in the form, such as check boxes, are clicked. I tried placing this on different actions as well at the keystroke in the properties format tab but didn't work there. I added the following line, which has helped however there is still one addition click before it changes, duplicating the last choose:

       

      this.getField("SoftwareList").value = "Select Software"

       

      Appreciate any help with this.