Copy link to clipboard
Copied
Hello,
Curious if it's possible to make a specific dropdown selection also populate specified checkboxes later on a .pdf form? Other options within the dropdown should not check any boxes. Is this possible? Thanks!
In the dropdown field under 'Options' tab, check 'Commit selected value immediately' if you want the script to trigger without the need to click outside the field once you make the choice.
Use this as 'Validation script of dropdown field:
this.getField("Unbundled").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check Box28").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check Box29").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check
...
Copy link to clipboard
Copied
Yes it is if you know JavaScript, and the document object model. But it will only work when viewing the PDF in Acrobat, though.
Copy link to clipboard
Copied
Where exactly do you need this to work? Do you have control over the application that will be used to fill the form?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
++ Adding to the discussion,
You can do that very easily with a script.
But what do you need to happen to the highlighted checkboxes when the user goes back and unchecks the DB checkbox?
Do you also need all of those checkboxes to become unchecked or leave them checked?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Make a structure to see what the checkboxes are called:
You would beed something like:
var myBox = this.getField("R1");
var myBox2 = this.getField("R2");
if (myBox.value === "Yes") {
myBox2.value = "Yes";
}
if (myBox.value !== "Yes") {
myBox2.value= "";
}
Where R1 is the box you woould check and R2 is the box that is contolled by checking box R1.
I like to define the veriables to make script more reusable.
Copy link to clipboard
Copied
In the dropdown field under 'Options' tab, check 'Commit selected value immediately' if you want the script to trigger without the need to click outside the field once you make the choice.
Use this as 'Validation script of dropdown field:
this.getField("Unbundled").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check Box28").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check Box29").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check Box30").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check Box26").checkThisBox(0,event.value == "DB" ? true : false);
this.getField("Check Box32").checkThisBox(0,event.value == "DB" ? true : false);
And here is your file with script added:
https://drive.google.com/file/d/1k_VO9gnLuMP3EdHsDPkvQD46eT9qN5DU/view?usp=share_link
Copy link to clipboard
Copied
Thank you so much!!
Copy link to clipboard
Copied
Thanks I see I didn't read the question correct