Copy link to clipboard
Copied
Hello experts,
I am trying to create a web form and the idea is whenever someone fills the form and submits it the time of the submission should be recorded and should be received automatically, I tried with almost all the tutorials available online...! very unfortunately I am not getting what I want..! I am not good at Java script or any other coding still spent plenty of time to figure this out and failed...! Truly will be very much grateful if some expert could help me out..! Thank you very much
Sorry, it was a mistake in the code I provided above. It needs to be:
this.getField("SubmitDate").value = util.printd("mm/dd/yyyy HH:MM", new Date());
The message you see was added by a third-party script you applied to the file. You can remove it via Document JavaScripts.
Copy link to clipboard
Copied
Is this a PDF form?
Copy link to clipboard
Copied
Hello yes it's a PDF form, as I believe once the form is being filled and submitted we could print the filled form for our records and we would also would know at what time the form has been submitted..! In other types of forms we would only get the data in an email..right?
Copy link to clipboard
Copied
OK. Do you want the date and time to be recorded in a field?
Copy link to clipboard
Copied
Thanks for the prompt reply ☺ yes that's how we need as the for the nature of the business we are in need of tracking the date and time though
Copy link to clipboard
Copied
OK, so before your Submit Form action add an Execute JavaScript action with this code (let's say the field is called "SubmitDate"):
this.getField("SubmitDate") = util.printd("mm/dd/yyyy HH:MM", new Date());
It's probably a good idea to make that field read-only, or even hidden, so the user can't change its value themselves.
Copy link to clipboard
Copied
Thank you so much for your prompt reply I will give it a try tonight and post the result sooner
Copy link to clipboard
Copied
Hello thanks for the help, and followed your guidance still could not figure out or it's not working Pls see the attached images that might help you to find out what am I doing wrong! Thank you
Copy link to clipboard
Copied
Why did you place the code as the Will Print action of the document, instead of the Mouse Up action of the Submit button?
Copy link to clipboard
Copied
Hi I am sorry, I am sure how to go about doing it...! I tried the property of Submit btn could not find any area to input the code, could you pls. walk me through
Thank you so much for your patience.
Copy link to clipboard
Copied
Under "Select Action" select "Run a JavaScript" and then paste the code into the window that opens.
Make sure this action is performed before the Submit Form action, by moving it up the list.
Copy link to clipboard
Copied
Hi thanks again, I believe I did it correct this time still no working pls. weather this is OK - Thanks
Copy link to clipboard
Copied
It looks OK... Are there any error messages in the JS Console (Ctrl+J) when you click the button? Can you share the file?
Copy link to clipboard
Copied
I could not recognize any error, by all means as I am working on a test file..! by the way how to attach this file? as its not yet on the actual server - Thanks
Copy link to clipboard
Copied
Hello sorry by the way I am getting this warning message pls have a look and I singed up a dropbox ac and the file is inside for your kind perusal
Copy link to clipboard
Copied
Sorry, it was a mistake in the code I provided above. It needs to be:
this.getField("SubmitDate").value = util.printd("mm/dd/yyyy HH:MM", new Date());
The message you see was added by a third-party script you applied to the file. You can remove it via Document JavaScripts.
Copy link to clipboard
Copied
Wow thank you so much for the help, I mean it...! it's perfectly working and I so happy and grateful to you - Thank You Again