Jump to content

DATE capture


RayT
 Share

Recommended Posts

I'm trying to capture the current date on a form to an e-mail data-export. Obviously end-users can input the date as in the example below - but that is not always reliable and is another task for them to complete. I'm told that it's just a case of defining the variable as with any other form-fields.request=Updatedate=16/04/06title=Mrfirstname=fredsurname=bloggsany help most appreciated,Ray T

Link to comment
Share on other sites

Not sure why you posted this in css :) Here's how to do it with JavaScript

<html><head><script type="text/javascript">function startTime(){var today=new Date()var d=today.getDate()var m=today.getMonth()var y=today.getYear()document.getElementById('d').value=d+"/"+m+"/"+y;}</script></head><body onload="startTime()">Date: <input type="text" id="d" /></body></html>

Link to comment
Share on other sites

  • 2 weeks later...
I'm trying to capture the current date on a form to an e-mail data-export.  Obviously end-users can input the date as in the example below - but that is not always reliable and is another task for them to complete.  I'm told that it's just a case of defining the variable as with any other form-fields.request=Updatedate=16/04/06title=Mrfirstname=fredsurname=bloggsany help most appreciated,Ray TThanks, help much appreciated - it works!Rt
Link to comment
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
 Share

×
×
  • Create New...