
[!eForm? &formid=`contactForm` &tpl=`eFormContact` &report=`eFormReport` &thankyou=`eFormThanks` &vericode=`0` &subject=`Contact from i-devs`!]
[!eForm? &formid=`contactForm` &tpl=`eFormContact` &report=`eFormReport` &thankyou=`eFormThanks` &vericode=`1` &subject=`Contact from i-devs [+fldSubject+]`!]
<p><span class="important">[+validationmessage+]</span></p>
<form method="post" action="[~[*id*]~]" id="formContact" class="clearfix">
<fieldset>
<legend>Contact Form</legend>
<input type="hidden" name="formid" value="contactForm" />
<p class="formInstruction"><span class="required">*</span> denotes required fields.</p>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="department">Attention: </label>
<select id="department" name="department" eform_options="Select Department::1" />
<option value="General">General Contact</option>
<option value="Support">Support</option>
<option value="Partnering">Partnering Opportunities</option>
</select></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="name">Name: </label>
<input type="text" id="name" name="name" maxlength="60" eform="Your Name::1:Please enter your name." /></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="email">eMail Address: </label>
<input type="text" id="email" name="email" size="40" maxlength="40" eform="Your eMail address:email:1:Please enter a valid eMail address." /></div>
<div class="fieldGroup"><label for="phone">Phone: </label>
<input type="text" id="phone" name="phone" size="40" maxlength="20" /></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="subject">Subject: </label>
<input type="text" id="subject" name="subject" size="40" eform="Subject of eMail::1:Please provide a subject." /></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="message"> Message: </label>
<textarea cols="40" rows="10" id="message" name="message" eform="Message:html:1:Please provide your message or comments."></textarea></div>
<!-- <p class="formInstructionCAPTCHA">Please enter the anti-spam code below (case sensitive):</p>
<img src="[+verimageurl+]" alt="verification code" border="1" class="imgCAPTCHA" />
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="vericode">Code: </label>
<input type="text" id="vericode" name="vericode" size="20" /></div>-->
<input type="submit" name="submit" value="Send Message" class="btnSubmit" />
</fieldset>
</form><p><span class="important">[+validationmessage+]</span></p>
<form method="post" action="[~[*id*]~]" id="formContact" class="clearfix">
<fieldset>
<legend>Contact Form</legend>
<input type="hidden" name="formid" value="contactForm" />
<p class="formInstruction"><span class="required">*</span> denotes required fields.</p>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="department">Attention: </label>
<select id="department" name="department" eform_options="Select Department::1" />
<option value="General">General Contact</option>
<option value="Support">Support</option>
<option value="Partnering">Partnering Opportunities</option>
</select></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="name">Name: </label>
<input type="text" id="name" name="name" maxlength="60" eform="Your Name::1:Please enter your name." /></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="email">eMail Address: </label>
<input type="text" id="email" name="email" size="40" maxlength="40" eform="Your eMail address:email:1:Please enter a valid eMail address." /></div>
<div class="fieldGroup"><label for="phone">Phone: </label>
<input type="text" id="phone" name="phone" size="40" maxlength="20" /></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="fldSubject">Subject: </label>
<input type="text" id="fldSubject" name="fldSubject" size="40" eform="Subject of eMail::1:Please provide a subject." /></div>
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="message"> Message: </label>
<textarea cols="40" rows="10" id="message" name="message" eform="Message:html:1:Please provide your message or comments."></textarea></div>
<p class="formInstructionCAPTCHA">Please enter the anti-spam code below (case sensitive):</p>
<img src="[+verimageurl+]" alt="verification code" border="1" class="imgCAPTCHA" />
<div class="fieldGroup"><span class="required" title="Required">*</span><label for="vericode">Code: </label>
<input type="text" id="vericode" name="vericode" size="20" /></div>
<input type="submit" name="submit" value="Send Message" class="btnSubmit" />
</fieldset>
</form><p>This is a message sent by [+name+] using the contact form on the website. The details of the message follow below:</p> <table> <tr valign="top"><td><strong>Attention: </strong></td><td> [+department+]</td></tr> <tr valign="top"><td><strong>Name: </strong></td><td> [+name+]</td></tr> <tr valign="top"><td><strong>Email: </strong></td><td> [+email+]</td></tr> <tr valign="top"><td><strong>Phone: </strong></td><td> [+phone+]</td></tr> <tr valign="top"><td><strong>Subject: </strong></td><td> [+subject+]</td></tr> <tr valign="top"><td><strong>Message: </strong></td><td> [+message+]</td></tr> </table> <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE:[+subject+]">[+email+]</a>.</p>
I just converted my mine site over, built in a subdirectory, and then moved over, replacing the site.
$autotext = (($tmp=efLoadTemplate($autotext))!==false )?$tmp:$_lang['ef_no_autotext'] . " '$autotext'";
if ($autotext && $fields['email']!='') {
if ($autotext != " ''" && $fields['email']!='') {

if( $protectSubmit ){
There are better ways at validating that automessage was originally declared, and if so, whether it resulted in a valid TPL result.
Also, I am running eForm2db (capturing form submission into database), and the protectSubmit option w/ eForm is great for reducing duplicate entries, etc.
However, I invoke the eFormOnBeforeMailSent method to use eForm2db, however, eFormOnBeforeMailSent comes BEFORE thecheck...if( $protectSubmit ){
...Should it come after??
This discussion is closed to further replies. Keep calm and carry on.