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.
Copy link to clipboard
Copied
Duplicate the process, giving all functions and doc-level variables new names.
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.
Copy link to clipboard
Copied
Just enter it as an option in your drop-down and select it, so it's the default value.
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?
Copy link to clipboard
Copied
What do you mean by "can't get it to see the other combo-box"?
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.
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.
Copy link to clipboard
Copied
Test
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?
Copy link to clipboard
Copied
Same as before, just using the new function name you've used for the second script...
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?
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
Copy link to clipboard
Copied
Thanks I am going to get one of your tools as that will save my sanity.
Cheers for your help