1 Reply Latest reply on May 17, 2016 6:38 PM by MinusZero

    Autofill a Form

    Hmosman Level 1

      I need help in setting up a auto fill within a dynamic form. I'm not sure all of this can be done. But any help would be greatly appreciated!


      On the form I have a dropdown box for employee profile. For example, if the user chooses employee profile #1 - I want the form to auto fill multiple fields after. Fields would include checkboxes, text fields, and other dropdown fields.

      •      Is this possible?
      • Is this a script and what is the basic formula?
        • 1. Re: Autofill a Form
          MinusZero Level 3

          You can do it by adding code to the change event of the employee profile dropdown box. You would need to code in all the employee details and manually add text to their relevant fields.


          You can populate a second (or more) dropdown but you have to make sure you clear it first like so:


          //dropdown change event

          if(this.rawValue == "Steven Speilberg")


          dropdown2.rawValue = ""; //sets the visible value of dropdown2 to null

          dropdown2.clearItems(); //clears the items in dropdown2's list. This must be done otherwise the items will keep adding everytime you select an item.

          dropdown2.addItem("Director"); //adds item to dropdown2

          dropdown2.addItem("Producer"); //adds item to dropdown2

          dropdown2.addItem("Writer"); //adds item to dropdown2

          this.resolveNode("titleTextField").rawValue = "Mr"; //adds the text Mr to the titleTextField textfield

          this.resolveNode("nicknameTextField").rawValue = "Stevie"; //adds the text Stevie to the nicknameTextField textfield



          You can also set checkboxes all by just changing the dropdown item selected.