Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Can I update multiple forms with the same dropdown at the same time

$
0
0

I have 20+ forms that have a common dropdown.  Each form has between 1 and 15 instances of this dropdown.  The values in the dropdown are updated on a frequent basis.

 

Currently I have an identical Document JavaScript named 'UpdateDropdowns' in each form.

 

function update_dropdowns()

{

    var aList = ["  ", "A", "B", "C"];

    //Add any other dropdown choices in the var aList in the format shown
    getField("TradeNameDropdown1").setItems(aList);

    getField("TradeNameDropdown2").setItems(aList);

    // Add any other dropdowns added to the form in the format shown

    // Open Log Console (Ctrl-J), enter update_dropdowns()  (Ctrl-Enter)

}

 

There are over 30 choices in my present iteration of var aList, but for brevity I've only listed the 3 examples to illustrate my JavaScript.

 

Currently when I have to update the dropdown, I follow these steps

  1. Open form
  2. Open UpdateDropdowns Document JavaScript
  3. Add the additional value(s)
  4. Highlight and copy the updated var aList
  5. Close the Document JavaScript
  6. Update the form in the Log Console
  7. Repeat process for all forms (pasting in the new var aList to ensure conformity)

 

Is there a way to update all of my forms at once without having to go through this form by form process?


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>