Indesign form fields change border color for required fields and add a save button
Using latest version of InDesign, I'm trying to find out how to write some JS in order to change the default red border around a text field marked required.
I have been unsuccessful so far with my code below. I have added it to the scripts user folder but when I run it I receive an error.
if (event.value=="1") {
event.target.fillColor = color.red
} else if (event.value=="2") {
event.target.fillColor = color.green
} else if (event.value=="3") {
event.target.fillColor = color.blue
} else if (event.value=="4") {
event.target.fillColor = ["RGB", 1, 1, 0];
} else {
event.target.fillColor = color.white
}
Does anyone have an idea on how to change the colors dynamically once input is added to a field?
Secondly, is there a way to add a button to save the pdf once it's filled out instead of clicking file/save, calling another method with JS that isn't well known that would call the save feature?
Thanks in advance!
