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

Populating fields from combo box selection

New Here ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

https://acrobatusers.com/tutorials/change_another_field

Being new to all this and not not being a coder by any stretch of the imagination I am feeling very pleased with myself having managed to make one combo box selection populate several other fields using the above tutorial.  My problem is I have several other combo boxes on my form which I am not able to separate from the document code I have followed. Can anyone help please or do I need to start again.

TOPICS
Edit and convert PDFs

Views

720

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 ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

Duplicate the process, giving all functions and doc-level variables new names.

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 ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

Thankyou I will try that. In the meantime would you know a way I could have the word "Select" as the combo box field you see and none of the fields populated when viewing the form for the first time.

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Just enter it as an option in your drop-down and select it, so it's the default value.

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Thanks . When I use the function "Document JavaScripts" I cannot get it to see the other combo box even when I change the names am I doing something incorrectly?

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

What do you mean by "can't get it to see the other combo-box"?

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

OK when I select "Document JavaScripts" from the menu it comes up with the Script Name "SetFieldValues" and this is reading the code that is used in my first combo box. When I select the next combo box it still reads this same code and I cannot change it separately.

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

The document scripts are not connected to the fields at all. They exist independently of them.

If you have a function there call SetFieldValues that you're calling from Dropdown1 and you want to create a new function for Dropdown2, just duplicate it, renaming it from SetFieldValues to SetFieldValues2, or whatever. The name doesn't matter, as long as its unique.

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Test

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

I have copied and paste document script to different name. How do I attach the document script to the appropriate combo box please?

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Same as before, just using the new function name you've used for the second script...

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Thanks for help but I am getting nowhere and I am wondering if it would be best to start again and explain what I am after rather than modifying a solution already posted.

My form has 2 separate combo boxes. One combo box selects one of say 3 manufacturers of temperature measuring equipment and populates the respective fields :Model, Serial Number, Calibration Certficate Number and Next calibration due date. The other combo box is exactly the same but for pressure measuring equipment. What is the best way to achieve this please?

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

If you don't want to mess around writing or editing code yourself, you can use this tool I've developed which allows you to set it up quite easily, and for multiple fields: Custom-made Adobe Scripts: Acrobat -- Populate Fields From Dropdown

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

LATEST

Thanks I am going to get one of your tools as that will save my sanity.

Cheers for your help

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