I have a PDF with two text fields on it "Today" and "Tomorrow". I am trying to have the form read the "Today" field and then display "Today" + 1 day in the "Tomorrow" field. So, if the "Today" text field is 2/18/2020 then the "Tomorrow" text field will read 2/20/2020. Here is the code I have so far:
this.addScript("init", "var d = new Date(); var f = this.getField(\"Today\"); if (f.value==\"\") f.value = d; var t = this.getField(\"Tomorrow\"); t.value = t.setDate(d+1);")
PDFJavaScript
Last Comment
leakim971
8/22/2022 - Mon
donnie91910
ASKER
The problem that i am having is that the "Tomorrow" field is not populating.
leakim971
do you get the Today value populated from your code?
donnie91910
ASKER
yes. The "Today" field does get populated.
Your help has saved me hundreds of hours of internet surfing.
fblack61
lenamtl
Hi,
Usually Javascript won't play well into PDF or not at all .
What do you use to generate the PDF?
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.