Change Form Field from visible onscreen but doesn't printing with script to printablr
I have this script which changes the color of the text based on the data.
Now, my issue is that if the message appears onscreen, I don't want it to print the message, however, if the actual text is visible onscreen, I'd like it to print the text. Ugh !!!
Here's my script so far.
var fn = this.getField("Patients_First_Name").valueAsString;
var mn = this.getField("Patients_Middle_Name").valueAsString;
var ln = this.getField("Patients_Last_Name").valueAsString;
if (!fn && !mn && !ln) {
event.value = "This will automatically fill-in after you complete Page 2.";
event.target.textColor = ["RGB", 175/255 , 102/255 , 74/255 ];
} else {
if (fn && mn && ln)
event.value = fn + " " + mn + " " + ln;
else if (fn && !mn && ln)
event.value = fn + " " + ln;
else if (!fn && mn && ln)
event.value = ln;
else if (fn && mn && !ln)
event.value = fn;
else if (fn && !mn && !ln)
event.value = fn;
else if (!fn && !mn && ln)
event.value = ln;
else
event.value = "";
event.target.textColor = color.blue;
}