Hi,
I currently call a validaton script as described in the Tutorials with the following line onSubmit="return checkForm(this)"
and a snipet of the code...
function checkForm(form)
{
if(form.Surname.value == "") {
alert("Please include your Surname !");
return false;
}
return true;
}
All works perfectly !
I would also like to include a script to insert the current date into the HTML email template I am using. The script is simple but I'm a little unsure of how to implement it using chronoforms.
<script type="text/javascript">
document.write(Date())
</script>
I've tried including the script in the Email Template section but no luck.
thanks.
I currently call a validaton script as described in the Tutorials with the following line onSubmit="return checkForm(this)"
and a snipet of the code...
function checkForm(form)
{
if(form.Surname.value == "") {
alert("Please include your Surname !");
return false;
}
return true;
}
All works perfectly !
I would also like to include a script to insert the current date into the HTML email template I am using. The script is simple but I'm a little unsure of how to implement it using chronoforms.
<script type="text/javascript">
document.write(Date())
</script>
I've tried including the script in the Email Template section but no luck.
thanks.
Hi cite,
The e-mail is created on the server, not in your browser, so there's no JavaScript available at that stage.
The simplest way to put the date in is probably to put a hidden field in your form and give it a value of
Bob<br><br>Post edited by: GreyHead, at: 2007/08/14 10:49
The e-mail is created on the server, not in your browser, so there's no JavaScript available at that stage.
The simplest way to put the date in is probably to put a hidden field in your form and give it a value of
value="<?php echo date(r) ?>"The 'r' is a format code that you can change - see the PHP manual here for different options.
Bob<br><br>Post edited by: GreyHead, at: 2007/08/14 10:49
This topic is locked and no more replies can be posted.
