Skip navigation
Jstout101
Currently Being Moderated

How to make items visible but inaccessible in a dropdown

Jul 31, 2012 1:31 PM

Tags: #javascript #livecycle #scripting #livecycle_designer #formcalc #livecycle_form #livecycle_forms

I have dropdown1 with items1-3.  I have dropdown2 with items 1-10.  When item1 is selected in dropdown1 I want dropdown2 to display all 10 items but some items be inaccessible(faded out) and not selectable.

 

(example)

 

item1  =    [dropdown2] item 1 = selectable

                [dropdown2] item 2 = selectable

                [dropdown2] item 3 = selectable

                [dropdown2] item 4 = not selectable

                [dropdown2] item 5 = selectable

                [dropdown2] item 6 = not selectable

              

and so on.

 

I have coded dropdown2 to populate based on items selected from dropdown1 but the problem is the user needs to see options that are not available for selection?

 

I am very new to FormCalc & Java any help would be greatly appreciated!!  I am using LiveCycle Designer ES 8.2

 
Replies
  • Currently Being Moderated
    Aug 1, 2012 9:43 AM   in reply to Jstout101

    Hi,

     

    you can do this with a script in the change event of the drop down box.

    It will check the boundItem against the notUsed regular expression.

     

    This example won't allow the selectio of item 1, 3, 4 and 8.

     

    var notUsed = /1|3|4|8/;
    if (this.boundItem(xfa.event.change).match(notUsed)) {
              xfa.event.change = "";
    }
    
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 10:47 AM   in reply to Jstout101

    Hi,

     

    i made an example for you.

     

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

     
    |
    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