Copy link to clipboard
Copied
what do I have to change in the script to make the no option of the clear form button I created not reset all of the checkboxes to transparent backgrounds. It currently keeps the data though.
var x = app.alert("Are you sure you want to clear this document and reset all fillable form fields?", 2, 2);
if(x == 4)
this.resetForm();
for (var i = 0; i < this.numFields; i++) { var oFld = this.getField(this.getNthFieldName(i)); oFld.fillColor = color.transparent; }
event.target.fillColor = ["RGB", 255/255, 255/255, 204/255];
var f = this.getField("Footer Copywrite");
if (f.valueAsString=="") f.value = util.printd("©yyyy", new Date());
Insert red part in your script:
var oFld = this.getField(this.getNthFieldName(i));
if(oFld.type == "checkbox" && oFld.valueAsString != "Off"){
continue;}
oFld.fillColor = color.transparent; }
It won't reset checkbox if it's checked.
Copy link to clipboard
Copied
Insert red part in your script:
var oFld = this.getField(this.getNthFieldName(i));
if(oFld.type == "checkbox" && oFld.valueAsString != "Off"){
continue;}
oFld.fillColor = color.transparent; }
It won't reset checkbox if it's checked.
Copy link to clipboard
Copied
Thank you!