Copy link to clipboard
Copied
Hello,
I have an order form with quantities 1-60, each with a corresponding check box. The reason is that sometimes when a client orders our product they want ten, sometimes they want 60 sometimes more.
I would like to know how to make it so that if our client wants 47, instead of checking each of the 47 boxes i pick just the 47th box and all previous boxes are checked as well.
I don't see a way to attach my file in here, but I do not mind sending it so people can see what I am trying to accomplish.
Thank you in advance for any help.
P.S. my java and coding knowledge is nil. I am an architectural draftsperson who was, for some strange reason, tasked with making all these pdf order forms. So I am really new to this pdf form making process.
I only have access to Adobe X standard (or Pro if I kick my coworker out of her computer, for some reason she has it but not me.)
OK, let's say the fields are called "Checkbox1" to "Checkbox60". You can use a doc-level function (although you'll need Acrobat Pro to add it) with this code and then call it from the MouseUp event of each of those fields:
function tickPreviousBoxes() {
if (event.target.value!="Off") {
var boxNumber = Number(event.target.name.replace("Checkbox", ""));
for (var i=1; i<boxNumber; i++) {
this.getField("Checkbox"+i).checkThisBox(0, true);
}
}
}
Copy link to clipboard
Copied
This is the danger of working with an endless loop... My bad. I fixed it now in the post above.
Copy link to clipboard
Copied
Thank you very much for all the help — you're just a lifesaver!