Copy link to clipboard
Copied
Hello. My form (created using Acrobat Pro) contains a number of dropdown boxes, with their background colour changing based upon dropdomn selection. It would be really useful if there was an option to switch off (and back on) all the dropdown box background colours. The reason being, the form is part of an assessment – for some users, it’s helpful to have the dropdown boxes colour showing, but for other users the coloured background could cause an issue. Would this be possible? The following is the current java script for one of my dropdown boxes. Many thanks, Mark
var f = event.target;
var fv = event.value;
if (fv == "Excellent range of skills evident") {
f.fillColor = ["RGB", 0, 0.5, 0.9];
}
else if (fv == "Skills consistently demonstrated") {
f.fillColor = ["RGB", 0.1, 0.8, 0];
}
else if (fv == "Skills occasionally demonstrated") {
f.fillColor = ["RGB", 1.02, 0.66, 0];
}
else if (fv == "Skills never / rarely demonstrated") {
f.fillColor = ["RGB", 1.02, 0.276, 0];
}
else {
f.fillColor = color.transparent;
}
You can make checkbox and add this code to the bottom of your code, it will make field transparent if checkbox is checked.
if(this.getField("Check Box1").isBoxChecked(0))
f.fillColor = color.transparent;
Copy link to clipboard
Copied
You can make checkbox and add this code to the bottom of your code, it will make field transparent if checkbox is checked.
if(this.getField("Check Box1").isBoxChecked(0))
f.fillColor = color.transparent;
Copy link to clipboard
Copied
Perfect, thanks Nasa.
Is there any way that, when the checkbox is selected, the dropdown boxes update - essentially toggling between the colours being on and off?
Thanks, Mark