Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Creating an Interactive PDF Form with Javascript Drop Down Rules

Community Beginner ,
Dec 28, 2017 Dec 28, 2017

Copy link to clipboard

Copied

I create interactive forms in InDesign CC for our sales team to download, fill out, and send back to our warehouse as submitted order forms. Right now, I have drop downs for several of the sections within our interactive forms, but what I'm wondering is: is there a way to add rules to the drop downs? I was told that it definitely isn't possible to add rules within InDesign but that it might be possible to add javascript rules in Adobe Acrobat.  Is it possible with javascript. If so, can someone point me towards any videos, tutorials, etc. that could help a super javascript n00b like me maybe figure out how to solve my problem? Example below:

Example: Let's say drop down 1 is Shirt size (small, medium, large); drop down 2 is shirt color (white, black, pink, navy, blue, and red); and drop down 3 is shirt pattern (solid, pinstrip, houndstooth).  Let's say the shirt pattern is only available in 3 out of the 5 colors.  Is there a way to make my form drop downs responsive based on selections in the other form fields?

Right now you could choose Size Small, Color Pink, and Shirt Pattern Houndstooth from their respective drop downs, but let's say the houndstooth pattern is only available with black, navy, and red.  Is there a way to set up responsive rules for form dropdowns that will automatically grey-out certain choices in a field based on a specific choice in a previous field?

Right now, we do list out the available options on our forms above the form field choices, but so many of our sales people don't read the available options and often choose combinations that aren't available, which slows down the order process because they submit to the warehouse, warehouse says those option combos don't exist, then they have to submit again, etc.

Any help you can provide would be greatly appreciated! 

TOPICS
PDF forms

Views

4.4K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2017 Dec 28, 2017

Copy link to clipboard

Copied

It's certainly possible, but it's not a simple task.

I've developed a tool that allows you set up such "cascading drop-downs", as I've called them, with relative ease. All you need to have is a spreadsheet that contains all of this information and then the tool will set up the code necessary for the drop-downs to work as you've described. You can get it from here: Custom-made Adobe Scripts: Acrobat -- Create Cascading Dropdowns

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 28, 2017 Dec 28, 2017

Copy link to clipboard

Copied

Appreciate your quick response! Thanks! I'll take a look!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2017 Dec 28, 2017

Copy link to clipboard

Copied

LATEST

Here are two tutorials that cover this exact topic:

https://acrobatusers.com/tutorials/js_list_combo_livecycle

https://acrobatusers.com/tutorials/change_another_field

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines