Jump to content

Current date in a form


Charles

Recommended Posts

  • Official Nitronaut

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 post
Share on other sites
  • 8 months later...
  • 2 years later...

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 post
Share on other sites
  • 4 months later...
jim smith
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 post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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