• Hello,
    I am using your contact form to send an email, I am interested in changing the time stamp for when the user submits(and email sent). I need this functionality to show in a time format that is to the millisecond or even more precise if possible? Can i do this or can you tell me how to do this?? right now the email received once the user submits is to the second inside the email body.

    Thank you kindly.

Viewing 1 replies (of 1 total)
  • Thread Starter mikecrf121

    (@mikecrf121)

    Hi,
    I have a someone related question that i know im super close on, however not really sure where to go from this point. so my goal is to capture to the millisecond, when the form is being email/or submitted. I am able to capture the time successfully and precisely and display its output in a div, but i dont know how to get that value to be set to a element in the form and send to include in the email(my logic is that this would actually have to delay the form from being sent for a bit, im trying to capture the time they hit submit, which i guess cf7 is actually recording the time the email is successful processed and sent off, see what im saying?)
    I use the below code to get the submission to the millisecond and display that in a div with id demo:

    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7submit’, function(){
    var d = new Date();
    var x = document.getElementById(“demo”);
    var h = addZero(d.getHours(), 2);
    var m = addZero(d.getMinutes(), 2);
    var s = addZero(d.getSeconds(), 2);
    var ms = addZero(d.getMilliseconds(), 3);
    x.innerHTML = h + “:” + m + “:” + s + “:” + ms;
    },false);
    function addZero(x,n) {
    while (x.toString().length < n) {
    x = “0” + x;
    }
    return x;
    }

    </script>

    Any help would be awesome!!! also a concern is the security of this, as the timestamp cant be altered maliciously, so maybe do this server side?? i really dont know.

    Thanks,
    -Mike

Viewing 1 replies (of 1 total)
  • The topic ‘Contact Form Email Time’ is closed to new replies.