Copy link to clipboard
Copied
I'm trying to piece together two bits of Javascript code that I found on these forums, but I'm not experienced in this at all so I keep getting an error message. This is what I have so far:
this.addScript("init", "var f = this.getField(\"Today\") + if (this.documentFileName=="Estimate Template.pdf")) f.value = new Date();");
What argument am I missing in this line of code?
Thanks in advance!
Just put this code into a document script:
if (this.documentFileName=="Estimate Template.pdf")
this.getField("Today").value = new Date();
Copy link to clipboard
Copied
I'm trying to piece together two bits of Javascript code that I found on these forums, but I'm not experienced in this at all so I keep getting an error message. This is what I have so far:
this.addScript("init", "var f = this.getField(\"Today\") + if (this.documentFileName=="Estimate Template.pdf")) f.value = new Date();");
What argument am I missing in this line of code?
Thanks in advance!
Just put this code into a document script:
if (this.documentFileName=="Estimate Template.pdf")
this.getField("Today").value = new Date();
Copy link to clipboard
Copied
Just put this code into a document script:
if (this.documentFileName=="Estimate Template.pdf")
this.getField("Today").value = new Date();
Copy link to clipboard
Copied
Many, many thanks.