Copy link to clipboard
Copied
I did a search a while back for how to get the date to autopopulate to today's date. I found an article that gave me this javascript to use (I do know know anything about java script so this was completely new).
This is the script: var f = this.getField("Today's Date");f.value = util.printd("mmm d, yyyy", new Date());
I created a text field, labled it "Today's Date". Clicked on the Javascript tool, then on Document Javascripts, names the script "Today's Date" and then put in the script and it worked.
I am copied and pasted that script and followed the same process for other documents and it has always worked.
Not now, I am trying to do the same and it's not working.
I tried clicking on Debugger just to see what that was (I have no idea what I'm doing) and this is what it showed:
Can someone help please? I would sure appreciate it!
Copy link to clipboard
Copied
The name of the field is not correct.
Copy link to clipboard
Copied
Thank you Bernd.
Can you explain a little more?
I have always used "Today's Date". What am I missing?
Copy link to clipboard
Copied
this.getField("Today's Date");
gives the value null.
That means that the script doesn't find the field in the document.
Copy link to clipboard
Copied
Oh ok, thank you.
I found that it wasn't saving the field name that I was typing in. It seems to be staying now (see below)
But the date is still not auto-populating
Copy link to clipboard
Copied
Look at the name of the field:
Copy link to clipboard
Copied
Oh! I didn't know that you had to name the script with the extra part after "Today's Date"
Thank you!
Now, since some of our students will not be completing this document electronically, I will have to print this document for them to write in their information and I don't want the auto-populated date to show when I print it.
Is there a way to do that?
Copy link to clipboard
Copied
You have created a Adobe Sign form.
Copy link to clipboard
Copied
Yes, we will be sending it to students to them to complete electronically.
But we also have students that struggle with technology or do not have a computer and internet at home to complete it so I will need to be able to print blank copies of the document so that students can hand write in their info.
So that is why I don't want the auto-populated date to show up on the blank printed copies because I am not sure what the date will be when students actually fill it out (I am going to print them ahead of time so we have them ready)
Copy link to clipboard
Copied
Check that your field name is correct.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now