Skip to main content
Inspiring
July 8, 2024
Answered

How to make Dropdown Box's mutually exclusive of each other?

  • July 8, 2024
  • 1 reply
  • 1216 views

I have a contrat with 2 dropdown box's depending  on which product is selected and the quanity selected in the dropdown, the price is calculated. 

I NEED TO MAKE THESE TWO DROPBOX'S MUTUALLY EXCLUSIVE SO BOTH PRODUCT DROPBOX'S CAN BE USED A THE SAME TIME.  If quanity for Product 1 is used, then Product 2 Dropbox is nonfunctional.

Product 1  x    (DropdownA box for quantity 1-5)    =  total price (Cost of Product A x Dropdown Quanitity)

Product 2 x     DropdownB Box for quanitiy 1-5)     =  total price (Cost of Product A x Dropdown Quanitity)

 

I would like to make the dropdown box's quanities exclusive to each other, so quantities for both items can not be calculated, only either or.  So by selecting Product 1 quanity, you can not select Product 2 dropdown quanity and visa-versa

 

This topic has been closed for replies.
Correct answer PDF Automation Station

I tested it and it works for me.  The dropdown values should have no value, 1,2,3,4,5  or 0,1,2,3,4,5.  If the user inactivated DropdownA by making a selection in DropdownB, DropdownA can be reactivated by setting Dropdown back to zero or no value, and vice versa.

1 reply

PDF Automation Station
Community Expert
Community Expert
July 8, 2024

 

Custom validation script in DropdownA:

 

if(event.value>0)

{this.getField("DropdownB").readonly=true}

else

{this.getField("DropdownB").readonly=false}

Custom validation script in DropdownB:

if(event.value>0)

{this.getField("DropdownA").readonly=true}

else

{this.getField("DropdownA").readonly=false}

 

 

Inspiring
July 8, 2024

Yes perfect, this worked.  Thank you!!!!!