Copy link to clipboard
Copied
I have a very large form where I have set the border color to red on multiple fields because they are important to check but may not be required. We're talking 100+ Fields some unique and some duplicated.
Now that I have finished making the form I am trying to determine the best way to make the red borders show up for users filling in the forms but not print when they print the forms.
I was hoping to work out a solution that would change all text fields, radio buttons, check boxes etc to transparent border using the strokeColor property like so from the DC SDK Documentation:
for ( var i=0; i < this.numFields; i++) {
var fname = this.getNthFieldName(i);
var f = this.getField(fname);
if ( f.type == "text") f.strokeColor = color.transparent;
}
However this has not worked on the Document will print event.
I was trying to get the bare minimum to work too as worst case scenario I could just get every field with red borders individually and turn them transparent but this also failed:
function border(){
var f = this.getField("fieldname");
f.strokeColor = color.transparent;
}
// alternatively
this.getField("fieldname").strokeColor = color.transparent;
Any help would be really appreciated! Thank you!
Copy link to clipboard
Copied
What happens when you print the document? What happens when you use a other color?
Copy link to clipboard
Copied
The red border for the form fields remain on the document, same with any other color.
Copy link to clipboard
Copied
This happens when you use a other color and not transparent?
Copy link to clipboard
Copied
Yes, for instance:
function blueborder(){
var f = this.getField("Consultant First Name");
f.strokeColor = color.blue;
}
Does not change the border to blue from red, or if it is set as no border to blue when the document prints.