Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to make choices in a drop down box change a value in another box

Avatar

Level 1

Hi,  I am fairly new to the world of creating forms in Adobe so please bear with my question if it seems simple.  I have seen where a lot of people are using code and I am very confused.  I am creating an order form and have created a drop down box (combo box).  There are 4 choices in this drop down box.  When the user chooses one of these choices, I would like an amount to appear in a seperate box.  Each choice would have a different amount.  Is this possible?  If so, could someone please give me step by step instructions.  I appreciate any help given!!

7 Replies

Avatar

Former Community Member

Yes it is possible but not without writing some code. Lets assume that youe DropDown is called DDList and the field you want to update is called TextField1 and the values in the DD are A, B, C, D. The code woudl look something like this and woudl be placed on the exit event of the DDList:

if (this.rawValue == "A") {

     TextField1.rawValue = "Value 1"

} else {

      if (this.rawValue == "B"){

          TextField1.rawValue = "Value 2"

      } else {

           if (this.rawValue == "C"){

               TextField1.rawValue = "Value 3"

           } else {

               TextField1.rawValue = "Value 4"

          }

     }

}

Avatar

Level 1

Ok, here is what I have but am not seeing anything happen.  Under the Combo box properties, actions tab, add an action- mouse exit, run a javascript

if (this.rawValue == "Bore") {Rate1.rawValue = "4.50"} else {if (this.rawValue == "Bore Railhead Adder"){Rate1.rawValue = "5.25"} else {if (this.rawValue == "Trench"){Rate1.rawValue = "4.50"} else {if (this.rawValue == "Trench  Railhead Adder"){Rate1.rawValue = "5.25"}}}}

Avatar

Former Community Member

Wait ...are you doing this in Acrobat or Designer?

Paul

Avatar

Former Community Member

They are both made by Adobe ...your response means nothing.

Paul

Avatar

Former Community Member

Thats your issue ...you are on the Designer forum and I gave you an answer for Designer (it uses a different type of form than you are usingn).....you want to post your question on the Acrobat forum ....they shoudl be able to give you an answer there.

Paul