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

Trigger multiple drop downs with single click?

Participant ,
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

I have four drop downs. Drop1, Drop2, Drop3, and Drop4. Each has an associated text field to show export values. I would like when clicking Drop1 then Drop2, Drop3, and Drop4 would trigger and place each of the drop downs values in the text fields. Doesn't sound too complicated to me, but I cannot find the correct script (and believe me I've searched). Can someone help me out and provide a script that would do what I'd like? Thanks guys.

Here's a script that comes very close to doing what I want. Kinda works but it will trigger only one drop down field and one text field. Is there a similar script that would trigger all the drop downs and text fields?

Sample script in the Custom Keystroke in Drop1:

if(event.willCommit)

  this.getField("Drop2").value = event.value;

if(event.willCommit)

  this.getField("Drop3").value = event.value;

if(event.willCommit)

  this.getField("Drop4").value = event.value;

TOPICS
Acrobat SDK and JavaScript , Windows

Views

482

Translate

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 ,
Aug 16, 2016 Aug 16, 2016

Copy link to clipboard

Copied

Hi.

You just have to place a JavaScript like this one as a "calculation script" into each text field:

event.target.value = this.getField("Dropdown1").value;

Where Dropdown1 is the name of the targeted dropdown.

See that sample file: Framadrop - Partagez des fichiers de façon anonyme

Votes

Translate

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
Participant ,
Aug 16, 2016 Aug 16, 2016

Copy link to clipboard

Copied

Heya JR,

Thanks for the reply. The script you provided doesn't exactly do what I'm trying to accomplish. In your example both drop downs do not have export values. In your example, it places the name of Dropdown1 into the text field. If I copy and paste the line of script into custom calc of Text4 then Dropdown1 name goes into Text4. Not what I want to do.

What I have is, at least, four drop downs which contain the same names but different export values (i.e., address in Drop1, SSN in Drop2, WorkClass in Drop3 and PayRate in Drop4). What I'm trying to do is to trigger each drop down to place their export values into text fields when I select a name in Dropdown1. The script I provide will work, but only for one drop down and one text field.

Very basically, I'm trying to make filling out my form automatic and time saving. I'm not trying to place the same info (values) in all the fields. I want to place each drop down info in the corresponding text field. It should be easy, shouldn't it?

If you'd like shoot me your email and I'll send you an example of what I am trying to do. Perhaps it would give you a better idea than my written explanation.

Votes

Translate

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
New Here ,
Aug 22, 2016 Aug 22, 2016

Copy link to clipboard

Copied

Try this: DropDownBox with more export values for each item

Drop down box with more export values :: scoreboards

Votes

Translate

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
Participant ,
Aug 22, 2016 Aug 22, 2016

Copy link to clipboard

Copied

LATEST

Hi Peter,

Thanks for providing the link. It really doesn't do what I want to do. Very basically, all I'm trying to do is when I select a name from the first drop down then the other three drop downs would trigger (as if you clicked and selected the same name manually). All four drop downs have the same names but export different values into text fields.

I'm trying to make filling out the form more automatic and faster. I cannot believe how many people cannot understand what I'm trying to do. After 42 emails, one expert couldn't get it and didn't understand what I am trying to do. Instead of manually selecting names from the drop down, making the selection from the first drop down and all the drop downs would be selected and trigger their export values into their text fields. Easy.

If you have the solution or another link please provide? I am my wits end trying to figure this out.

Votes

Translate

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 ,
Aug 17, 2016 Aug 17, 2016

Copy link to clipboard

Copied

Please, post a link to your example file here on the forum since I'm not the only one that can help you.

Votes

Translate

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