0 Replies Latest reply on Jun 26, 2015 8:05 PM by jasminep41032624

    How to you populate a text field based on a DropDown selection

    jasminep41032624 Level 1

      Hello,

       

      I am creating a form that has a dropdown menu called 'ModelName1' with 3 different options to select from: Companion 0.A, Companion 0.B, and Companion 2. Depending on what is selected in the dropdown menu. I would like a different text field called 'ModelDescription' to be filled in automatically with a corresponding description for the model. For example, if Companion 0.A is selected then I would like the text field to populate the following:


      "An actively managed Mutual Fund portfolio designed to minimize portfolio risk and volatility and maximize overall portfolio returns by diversifying investments across various asset classes.  Generally for accounts with less than $50,000 in investable assets.  Target Allocation: Fixed Income (98.0%) and Cash (2.0%)."


      I have no experience with Javascript so please explain in the most simplistic way possible. I do have experience with some other scripting languages and a novice understanding of SQL, but I've never used JavaScript before.


      Lastly, this gets a little more complicated - the form will eventually have 12 dropdown menus with the same items listed. In the end I would like the form to be dynamic where if, say 3 of the dropdown menus are being used, that 5 descriptions will appear in the text field, BUT I don't want any of them duplicated. For example, say dropdown menu #1 has Companion 0.A selected, dropdown menu #2 has Companion 0.A selected, and dropdown menu #3 has Companion 2 selected I would only want the text field to be updated with the descriptions associated with Companion 0.A (one-time) and Companion 2. Hopefully this all makes sense! I look forward to any and all help that can be provided!


      Thank you!