Expand my Community achievements bar.

Drop Down menu effects another drop down menu

Avatar

Former Community Member

Hello,

I'm a total and complete ametuer when it comes to this program, but I need to get this job done.

I need to create a list of products in one drop down menu, when a product is selected, another drop down menu to the right creates a list of price types.

SO for example, I select the product "SOAP" and you make a selection on the right in another drop down menu of "WHITE" "RED" "ORANGE"

If is was to use "SOAP LIQUID" another menu of selections would come up.

How do I go about setting this up?

Thanks,

Clay

8 Replies

Avatar

Level 10

You need to write script to add items to the second dropdown based on the selected value in the first dropdown.

The below sample can help you in achieving this.

https://acrobat.com/#d=JS47-qO-yh7XgT-Nn5Gi2A

Thanks

Srini

Avatar

Former Community Member

I took a look at this, saw the script at the top. but I can't find where the person added the content.

He has the list of states and countries, but I simply can't find where that content is added, and it's not in the list box on the right.

Avatar

Level 10

The script was written in Script Object. The function is called in the Change event of the Country Dropdown.

DropDown.jpg

Thanks

Srini

Avatar

Former Community Member

Thanks!

This has helped a lot!

But, for some reason, my right drop down menu isn't want to drop at all, it does nothing when clicked. I'm working on it though.

Avatar

Level 10

That might be because, the right dropdown does not have any data added to it.

If you can, post your form, I can have a look at it.

Steps to upload the document

1) goto acrobat.com website
2) login with your Adobe login/password.
3) In Actions you will find Upload. Select your form and upload.
4) After uploading, select form name in All Files section and right click and select share.
5) Check the checkbox "Allow anyone with a link to view this document".
6) Copy the URL link and post it in the forum.

Thanks

Srini

Avatar

Former Community Member

Please take a look at this! I haven't setup any MY CORRECT data yet, but the sample data is still in there I just can't seem to get that drop down menu under "Group" to pull down.

https://acrobat.com/#d=NmqMIr9-SAnonF6RnA**sg

Also, while your in there, could direct me to the path of using the email button, I need to have someone select a Product manager under the pulldown menu then have that submit to the correct email of that product manager in a PDF format not XML. I know that is probably a whole other script.

You are a life saver!!!

Avatar

Level 10

The reason that you di dnot see any data in the Pricing dropdown was because you missed to put the code in the Change event of Product dropdown.

Check the attached file for your reference.

https://acrobat.com/#d=ocUMe*51z5yNUN6Y1sIG*Q

changes I did on your form:

1) I added script the Change event for the Product dropdown.

2) In the global function getPricing I changed the below highlighted text

          if(myProducts[i][0] == priceField.rawValue)  // Check to see if they match.

     replaced with

          if(myProducts[i][0] == xfa.event.newText)  // Check to see if they match.

For your second question on the email, I changed the Email Submit button to a Normal button with type "Submit". This change will give you control on how the data can be submitted. So I selected the Submit As "PDF" instead of "XML". and I placed the code in the preSubmit event of the button.

The Manager dropdown can be filled with the names and email address in the Initialize event and the selected manager's email can be captured in the preSubmit event of the Email button. (check the attached file for your reference).

Submit.jpg

Thanks

Srinihttps://acrobat.com/#d=ocUMe*51z5yNUN6Y1sIG*Q

Avatar

Level 1

http://forums.adobe.com/message/2672739

referencing original thread..

I have tried to emmulate this - infact I gave up modifying my own form and started retrofitting the sample..

I still can not get the dynamic drop downs to work..

Additionally, I cannot import or add in the PDF I created in Indesign as the background art..

Art File  https://acrobat.com/#d=AU0x4SiaIAnlUtv7fjN4Ow

Form File  https://acrobat.com/#d=WKWDvtu9n0BH7FctSNjh2A

Thanks

Lisa