PDA

View Full Version : any preformatted form mail tags?


esprit
12-16-2002, 12:35 AM
any preformatted form mail tags?

don5408
12-16-2002, 03:50 AM
"any preformatted form mail tags?"

Hi. If you haven't already seen it note that HR has some FormMail documentation which includes details on all of the supported FormMail tags under "Form Mail" in the HR Control Panel.

If by "any preformatted form mail tags" you mean can anyone post an example of a form using FormMail just to give you an idea the following is a very simple (name, email, commments) form (it's calling the copy of FormMail HR has available in cgi-sys so you should be able to just include it in a file in the esprit-automotiv.com domain as is and use it for testing purposes):

<!-- BEGIN EMAIL CONTACT FORM -->
<FORM ACTION="/cgi-sys/FormMail.pl" METHOD="POST">
<INPUT TYPE="hidden" NAME="recipient" VALUE="enquiry@esprit-automotiv.com">
<INPUT TYPE="hidden" NAME="subject" VALUE="FormMail Contact">
<INPUT TYPE="hidden" NAME="required" VALUE="email,realname,comments">
<INPUT TYPE="hidden" NAME="redirect" VALUE="http://esprit-automotiv.com/thanks.html">
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
<TR>
<TD WIDTH="120">&nbsp;</TD>
<TD><FONT SIZE="4"><U><B>Contact Us</B></U></FONT></TD>
</TR>
<TR>
<TD WIDTH="120" ALIGN="Right">name:</TD>
<TD><INPUT TYPE="text" NAME="realname" SIZE="25"></TD>
</TR>
<TR>
<TD WIDTH="120" ALIGN="Right">email:</TD>
<TD><INPUT TYPE="text" NAME="email" SIZE="25"></TD>
</TR>
<TR>
<TD WIDTH="120" ALIGN="Right" VALIGN="Top">comments:</TD>
<TD><TEXTAREA NAME="comments" ROWS="8" COLS="21"></TEXTAREA></TD>
</TR>
<TR>
<TD WIDTH="120">&nbsp;</TD>
<TD><INPUT TYPE="submit" VALUE="Submit">&nbsp;&nbsp;&nbsp;<INPUT TYPE="reset" VALUE="Reset"></TD>
</TR>
</TABLE>
</FORM>
<!-- END EMAIL CONTACT FORM -->

Note that the form above includes a redirect tag which after a successful form submission forwards the user to a "thanks.html" page with a link back to your main page rather than leaving them at the default FormMail response, if you wish this to work upload something along these lines as thanks.html to your public_html folder:

<HTML>
<HEAD>
<TITLE>Thank You!</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<H1>Thank You!</H1>
<H3>Your message has been submitted<BR>
and will be processed ASAP</H3>
<H5><A HREF="http://esprit-automotiv.com/">
esprit-automotiv.com</a></H5>
</CENTER>
</BODY>
</HTML>

Tha above is just a very basic example of a generic "contact us" or "feedback" form, it's really up to you to decide what fields you wish to add and what information you wish those submitting to provide depending on the situation and the nature of the form.

PS: If you mean something different by "preformatted form mail tags" please explain exactly what you are looking for.

Hope that helps!
Don

esprit
12-18-2002, 12:02 AM
Don,
Thanks, this is exactly what I need.
How do I go about inserting a drop down list?
Must the input type be in order?
Robin

don5408
12-18-2002, 08:16 AM
"Thanks, this is exactly what I need."

You're welcome, Robin, glad to hear it. ;-)

"How do I go about inserting a drop down list?"

You would use <select></select> giving the variable a name
(ex: state) and creating options with different values for "state"
(ex: AL, AK, AZ etc).

Example:

Experience Level:
<select name="experience">
<option value="novice">Novice
<option value="intermediate">Intermediate
<option value="advanced">Advanced
<option value="expert">Expert
</select>

You can also use 'radio buttons':

Race:
<INPUT TYPE="radio" NAME="race" VALUE="human">human
<INPUT TYPE="radio" NAME="race" VALUE="alien">alien

...and/or checkboxes:

Licences:
<INPUT TYPE="checkbox" NAME="licence" VALUE="drivers">
driver's licence
<INPUT TYPE="checkbox" NAME="licence" VALUE="marriage">
marriage licence
<INPUT TYPE="checkbox" NAME="licence" VALUE="kill">
licence to kill

"Must the input type be in order?"

Nope...everything must be between your <FORM></FORM> tags however other than that I've never found the order to matter.

Don

esprit
12-19-2002, 02:16 AM
Cheers Don, that should do the trick for my contact page. Rob