<?php
function checkField(&$fields,&$vMsg,&$rMsg) {
if(!empty($fields['Last__Name'])) {
return false;
} else {
return true;
}
}
?>[!echeckField!] [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` &vericode=`1` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46` &eformOnValidate=`checkField` !]
<p class="error">[+validationmessage+]</p>
<form method="post" action="[~[*id*]~]" id="ContactForm" name="ContactForm">
<div class="span-24 clearfix">
<div class="span-12">
<p>all fields are required</p>
<p><label for="cfName">your name:</label>
<input name="name" id="cfName" type="text" eform="Your Name::1:" /></p>
<p><label for="cfPhone">phone:</label>
<input " name="phone" id="cfPhone" type="text" eform="Your Phone::0:" /></p>
<input style="display: none" type="text" name="Last__Name" id="LastName" size=30 autocomplete="off" eform="LastName::0:" />
<p><label for="cfEmail">email:</label>
<input name="email" id="cfEmail" type="text" eform="Your Email::1:" /></p>
<p><label for="cfDay">your message: </label>
<textarea name="day" id="cfDay" rows="4" cols="20" eform="Your day:textarea:1" ></textarea></p>
<p>
Please help us fight spam by entering the CASE SENSITIVE code below:<br />
<img src="[+verimageurl+]" alt="verification code" border="1"/>
</p>
<p>
<label accesskey="c" for="vericode">code</label>
<input type="text" name="vericode" size="20" />
</p>
<p><label> </label>
<input type="image" id="cfContact" src="assets/images/submit.jpg" alt="Submit Form" value="submit"> </p> </div>
<div class="span-8 push-1 contactBlurb">
<h4> Get in Touch with us!</h4>
<p> We’d love to hear from you<br /></p> <br /><br /><br /></p>
</div>
<input name="formid" type="hidden" value="ContactForm" />
<input name="subject" type="hidden" value="Website Contact Form" />
</div>
</form>Fatal error: Cannot redeclare checkfield() (previously declared in /home/acktri/public_html/manager/includes/document.parser.class.inc.php(814) : eval()’d code:2) in /home/acktri/public_html/manager/includes/document.parser.class.inc.php(814) : eval()’d code on line 8

Fatal error: Cannot redeclare checkfield() (previously declared in /home/acktri/public_html/manager/includes/document.parser.class.inc.php(814) : eval()’d code:2) in /home/acktri/public_html/manager/includes/document.parser.class.inc.php(814) : eval()’d code on line 8
maybe just a typo? Smileyeh, sorry, the name relates to the function name, not the snippet name
&eformOnValidate=`checkField`
echeckField
function valext(&$fields,&$vMsg,&$rMsg) {
/* Require either phone number or email or both for contact form */
if (empty($fields['cMail']) AND empty($fields['cPhone'])) {
$rMsg[] = '<br />An email address or phone number';
}
return true;
}
KP
<?php
function checkField(&$fields,&$vMsg,&$rMsg) {
if(!empty($fields['Last__Name'])) {
$rMsg[] = '<br>Unable to send message due to tear in fabric of universe';
}
return true;
}
?>
KP