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

Populating drop down lists

$
0
0

Greetings

I have created a form in Acrobat XI Pro with 3+ text fields which populate a drop down list.  My problem is that when I duplicate the Drop down, which I need to do around 50 times, each selection resets all the drop downs to that choice.

The Drop down fields have a Javascript action added to call a single Javascript. 

function popDropdown()

{

 

 

    var myBlocks = [];

     {

        myBlocks.push("Select from Drop down");

    }

  

    if (this.getField("Block1").value != "")

    {

        myBlocks.push(this.getField("Block1").value);

    }

   

    if (this.getField("Block2").value != "")

    {

        myBlocks.push(this.getField("Block2").value);

    }

   

    if (this.getField("Block3").value != "")

    {

        myBlocks.push(this.getField("Block3").value);

    }

 

 

    this.getField("select").clearItems();

    this.getField("select").setItems(myBlocks);

  

}


Viewing all articles
Browse latest Browse all 12130

Trending Articles



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