Skip navigation
Currently Being Moderated

Populating a drop down box based on another drop down box selection

May 10, 2012 5:10 AM

Good day all;

On a form I am designing I have 2 drop down menus labeled, directorate and division.

What I would like to do is when the user selects a directorate, the division drop down is only populated with a list of divisions that belong to the selected directorate.

I am sure I have seen this question asked before, but, I am at a loss to find it…..

 

Thanks All

Chomp

 
Replies
  • Currently Being Moderated
    May 10, 2012 7:37 AM   in reply to The Chomp

    Here is a sample that can give idea on how to do this..

     

    https://acrobat.com/#d=CpmL3cuLdnNPeJ6Vc0IhdQ

     

    Thanks

    Srini

     
    |
    Mark as:
  • Currently Being Moderated
    May 10, 2012 9:51 AM   in reply to The Chomp

    I find it easier to do with a switch() statement and hand code it but if you have a lot of data doing some sort of loop through an array might be easier.

     

    Below is just a small snip of quite a long list I have in one form. Using xfa.event.newText to get immediate response from the dropdown.

     

    //on the Change event

    var selection = this.boundItem(xfa.event.newText);

    Desc.clearItems(); //Desc is the target dropdown

    Desc.rawValue = "";

    //above line needed to clear the displayed value in the next dropdown, clearItems() just clears the list.

     

    switch (selection)

    {

      case "AE":

           Desc.addItem("DF");

           Desc.addItem("FR");

           Desc.addItem("MS");

           Desc.addItem("PC");

      break;

      case "AN":

           Desc.addItem("BI");

           Desc.addItem("FI");

           Desc.addItem("GE");

           Desc.addItem("OT");

           Desc.addItem("ZO");

      break;

    }

     
    |
    Mark as:
  • Currently Being Moderated
    May 10, 2012 9:52 AM   in reply to Jono Moore

    Anybody else lost the ability to get at the advanced formatting (setting font family, etc.)? Can't seem to find where it's gone...

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points