Jump to content
Nitro Cloud is now Nitro Sign! ×
Charles

Current date in a form

Recommended Posts

Charles

How can I set the current date to auto fill in a text field in a fillable pdf each time the form is opened?

Share this post


Link to post
Share on other sites
Leslie V.

Hello Charles,

Thank you for reaching out to us through our Community Forums!

You can add a custom script for this. Click on Edit All Fields. Right click on the text field you wish to auto populate and select Properties.

Select the Calculate tab> Custom Calculation script and add your script.

var today = new Date();
event.value = util.printd("mmmm dd, yyyy", today);


Immediately you should see the date populate into the field.

Please note that we do not provide support for creating and editing scripts. The script above has been useful for several users of Nitro Pro. However, should you need any additional assistance with JavaScript, a web search will generate the information you are looking for.

I hope this helps!

Share this post


Link to post
Share on other sites
margos186

Leslie,

I too tried the script above and it works. How do you make it so the date will not refresh each time you

open the pdf form?

Share this post


Link to post
Share on other sites
Pacman45

I would like to auto fill a date field only when the field gets the focus and only if a date already doesn't exist in the field (null).  I tried this and it doesn't work:

In the Actions tab, I selected On Focus for the trigger and added the following Javascript:

If (event.value == "")

{

    var today = new Date();

   event.value = util.printd("mm/dd/yyyy",today);

}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.