I have created a form for simple emails and it stores the data in the database however it does not send the email. the email address is styped correctly. Can anyone help?
Cheers
http://batterydoctors.com.au/component/option,com_chronocontact/Itemid,31/chronoformname,ChronoContact_Email/
code below
<table cellpadding="0" cellspacing="5" border="0">
<tr><td width="90">Title:</td><td>
<select name="title">
<option>Mr.</option>
<option>Mrs.</option>
</select>
</td></tr>
<tr><td><b>Name:</b></td><td>
<input type="text" name="name" size="40">
</td></tr>
<tr><td>Age:</td><td>
<input type="text" name="age" size="5">
</td></tr>
<tr><td><b>Email:</b></td><td>
<input type="text" name="email" size="40">
</td></tr>
<tr><td><b>Subject:</b></td><td>
<input type="text" name="subject" size="40">
</td></tr>
<tr><td><b>Message:</b><br>(Max : 1000chrs)</td><td>
<textarea rows="5" cols="40" name="maxcharfield" id="maxcharfield"
onKeyDown="textCounter(this,'progressbar1',1000)"
onKeyUp="textCounter(this,'progressbar1',1000)"
onFocus="textCounter(this,'progressbar1',1000)"></textarea><br />
<div id="progressbar1" class="progress"></div>
<script>textCounter(document.getElementById("maxcharfield"),"progressbar1",1000)</script>
</td></tr>
</table>
<input type="submit" name="Submit" value="Send" onClick="process_general_form()">
********************************************************
function process_general_form() {
var email = document.ChronoContact_ChronoContact_Email.email.value;
var name = document.ChronoContact_ChronoContact_Email.name.value;
var subject = document.ChronoContact_ChronoContact_Email.subject.value;
var message = document.ChronoContact_ChronoContact_Email.maxcharfield.value;
if ((email == ""))
{
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.email.focus();
} else if ((name == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.name.focus();
} else if ((subject == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.subject.focus();
} else if ((message == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.maxcharfield.focus();
} else {
document.ChronoContact_ChronoContact_Email.submit();
}
}
batterydoc
Cheers
http://batterydoctors.com.au/component/option,com_chronocontact/Itemid,31/chronoformname,ChronoContact_Email/
code below
<table cellpadding="0" cellspacing="5" border="0">
<tr><td width="90">Title:</td><td>
<select name="title">
<option>Mr.</option>
<option>Mrs.</option>
</select>
</td></tr>
<tr><td><b>Name:</b></td><td>
<input type="text" name="name" size="40">
</td></tr>
<tr><td>Age:</td><td>
<input type="text" name="age" size="5">
</td></tr>
<tr><td><b>Email:</b></td><td>
<input type="text" name="email" size="40">
</td></tr>
<tr><td><b>Subject:</b></td><td>
<input type="text" name="subject" size="40">
</td></tr>
<tr><td><b>Message:</b><br>(Max : 1000chrs)</td><td>
<textarea rows="5" cols="40" name="maxcharfield" id="maxcharfield"
onKeyDown="textCounter(this,'progressbar1',1000)"
onKeyUp="textCounter(this,'progressbar1',1000)"
onFocus="textCounter(this,'progressbar1',1000)"></textarea><br />
<div id="progressbar1" class="progress"></div>
<script>textCounter(document.getElementById("maxcharfield"),"progressbar1",1000)</script>
</td></tr>
</table>
<input type="submit" name="Submit" value="Send" onClick="process_general_form()">
********************************************************
function process_general_form() {
var email = document.ChronoContact_ChronoContact_Email.email.value;
var name = document.ChronoContact_ChronoContact_Email.name.value;
var subject = document.ChronoContact_ChronoContact_Email.subject.value;
var message = document.ChronoContact_ChronoContact_Email.maxcharfield.value;
if ((email == ""))
{
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.email.focus();
} else if ((name == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.name.focus();
} else if ((subject == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.subject.focus();
} else if ((message == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.maxcharfield.focus();
} else {
document.ChronoContact_ChronoContact_Email.submit();
}
}
batterydoc