Copy link to clipboard
Copied
I'm hoping to apply conditional formatting on a fillable form which is an Interactive PDF file (designed in InDesign). Unfortunately, the Buttons and Forms window in InDesign only allows font type and font size to be changed for the drop-down, not color.
Based on what drop-down option is selected, I want the final text to appear in that said color. Is there a script or something I could apply?
Copy link to clipboard
Copied
You can use something like this as the custom validation script of the drop-down:
var f = this.getField("Text1");
if (event.value=="YELLOW") f.textColor = color.yellow;
else if (event.value=="GREEN") f.textColor = color.green;
else if (event.value=="RED") f.textColor = color.red;
else f.textColor = color.black;
Copy link to clipboard
Copied
You can use something like this as the custom validation script of the drop-down:
var f = this.getField("Text1");
if (event.value=="YELLOW") f.textColor = color.yellow;
else if (event.value=="GREEN") f.textColor = color.green;
else if (event.value=="RED") f.textColor = color.red;
else f.textColor = color.black;
Copy link to clipboard
Copied
I'm converted my interatcive PDG into a Form.
Using a "submit" button, I have added in the following actions upon a Mouse-Up click of the button.
1) Run JavaScript
2) Submit a form (mailto:)
The following is what I have listed as the script but it doesn't seem to be working. What am I doing wrong? Any advice?
var f = this.getField("Budget Status");
if (event.value=="YELLOW") f.textColor = color.yellow;
else if (event.value=="GREEN") f.textColor = color.green;
else if (event.value=="RED") f.textColor = color.red;
else f.textColor = color.black;
var f = this.getField("Design Status");
if (event.value=="Either client is happy with the design & team is not, or team is happy with design & client is not.") f.textColor = color.yellow;
else if (event.value=="Client is happy with design & team is proud of the design.") f.textColor = color.green;
else if (event.value=="Neither team nor client are happy with design.") f.textColor = color.red;
else f.textColor = color.black;
var f = this.getField("Craft Status");
if (event.value=="Team is proud of the quality of the diagrams and/or drawings issued/to be issued.") f.textColor = color.green;
else if (event.value=="Team is not happy of the quality of the diagrams and/or drawings issued/to be issued.") f.textColor = color.red;
else if (event.value=="There is room for improvement on the quality of the diagrams and/or drawings issued/to be issued.") f.textColor = color.yellow;
else f.textColor = color.black;
var f = this.getField("Schedule Status");
if (event.value=="Project is tracking with distributed design & documentation schedule.") f.textColor = color.green;
else if (event.value=="A project design schedule has not been distributed.") f.textColor = color.red;
else if (event.value=="Project is slipping from distributed design & documentation schedule - update required.") f.textColor = color.yellow;
else f.textColor = color.black;