I have a perplexing problem with my form: it works great but ONLY if the HTML code includes a drop-down select box (which I don’t want). If remove that box (along with the code surrounding it), then when I process the form, I recieve the errror: "Could not instantiate mail function."
For example, here is the code that works for me. The code that is in red is the code I want to remove. However when I remove it, my form no longer works. My question is why in the world would that be? Any sugestions would be appreciated. Thanks!
[+validationmessage+]
<form action="[~[*id*]~]" method="post" name="[object]">
<p><input name="formid" type="hidden" value="feedbackForm" /></p>
<table cellspacing="2" cellpadding="3" border="0">
<tr>
<td align="right"><label accesskey="n">Name</label><span class="required">*</span></td>
<td align="left"><input maxlength="60" name="Name" eform="Your Name::1:" size="45" style="width: 200px;" type="text" /></td>
</tr>
<tr>
<td align="right"><label accesskey="e">Email</label><span class="required">*</span></td>
<td align="left"><input maxlength="60" name="email" eform="Email:email:1" size="45" style="width: 200px; type="text" /></td>
</tr>
<tr>
<td align="right"><label accesskey="p">Phone</label><span class="required">*</span></td>
<td align="left"><input maxlength="60" name="phone" eform="Phone::1" size="45" style="width: 200px; type="text" /></td>
</tr>
<tr>
<td align="right" valign="top"><label accesskey="s" for "department">Subject</label><span class="required">*</span></td>
<td align="left">
<select name="department">
<option value="1">Sales Enquiry</option>
<option value="2">Support Request</option>
<option value="3">Website Feedback</option>
</select>
</td>
</tr>
<tr>
<td align="right" valign="top"><label accesskey="c">Message</label><span class="required">*</span></td>
<td align="left"><textarea cols="35" name="message" rows="8"></textarea></td>
</tr>
<tr>
<td align="right">Anti-Spam Code</td>
<td align="left"><img alt="verification code" border="1" src="[+verimageurl+]" /></td>
</tr>
<tr>
<td align="right"><label accesskey="c">Please enter the
Anti-Spam Code above:</label><span class="required">*</span></td>
<td align="left"><input name="vericode" type="text" /></td>
</tr>
<tr>
<td align="right"> </td>
<td align="right"><input name="submit" type="submit" value="SEND" /></td>
</tr>
</table>
</form>
-
☆ A M B ☆
- 24,524 Posts
I’m pretty sure that forms the "subject" of the email, without which of course it won’t work. How is your snippet called? What does it have for the "&subject=" parameter?
Thanks Susan for pointing me to the snippet call.
The &subject parameter looked fine however when I looked at the rest of the code, it was a bit screwy. I cleaned it up and now the form works great.