Charles Posted February 10, 2017 Report Share Posted February 10, 2017 How can I set the current date to auto fill in a text field in a fillable pdf each time the form is opened? Link to comment Share on other sites More sharing options...
Official Nitronaut Leslie Villarin Posted February 16, 2017 Official Nitronaut Report Share Posted February 16, 2017 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! Link to comment Share on other sites More sharing options...
Charles Posted February 17, 2017 Author Report Share Posted February 17, 2017 It worked! Link to comment Share on other sites More sharing options...
margos186 Posted October 27, 2017 Report Share Posted October 27, 2017 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? Link to comment Share on other sites More sharing options...
Pacman45 Posted March 19, 2020 Report Share Posted March 19, 2020 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); } Link to comment Share on other sites More sharing options...
jim smith Posted July 27, 2020 Report Share Posted July 27, 2020 On 2/16/2017 at 4:56 AM, Leslie V. said: 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 home mushroom growing kit); 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! That's great! can you help me i need a script for my blog. I want to add a subscribe button on it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now