I am trying to create a form which can be sent by email. I am new to 
Coldfusion, please help. Below is the code:


Overs Form:- 
<cfinclude template="header.cfm">
<span class="desc">OversForm</span>
<hr color="black">

<cfform action="updateOvers.cfm" method="post" name="OversForm">
<cfoutput>
<table>
<tr><td>Date 
Entered</td><td><cfoutput><strong>#dateformat(now(),"MM/dd/YYYY")#</strong></cfoutput></td></tr>
<tr><td>Job No.</td>
<td><input type="text"  name="jobn"  size="15" > </td> </tr>
<tr><td>Customer Name</td>
<td><input name="CustomerName" type="text" size="40" maxlength="45" ></td></tr>
<td>Card Description </td>
<td><input name="CardDescp" type="text" value="" size="40" 
maxlength="45"></td></tr>
<tr><td>Total Quantity </td><td><input name="Totalqty" type="text" value="" 
size="25" maxlength="15"></td></tr>
<td>TotalQuantity Shipped</td><td><input name="shipqty" type="text" value="" 
size="25" maxlength="15"></td></tr><tr>
<td>Overs 10% By </td><td><input name="Oversby" type="text" value="" size="25" 
maxlength="30"></td></tr>
<tr><td>Ship Overs</td><td><input name="Shipovers" type="checkbox" value="yes" 
> 
<tr><td>Customer Service Rep </td><td><input name="customerServiceRep" 
type="text"  size="40" maxlength="40"></td></tr>
<tr><td>Email To </td><td><cfinput type="text"  name="Email" size="40" 
required="yes" message="Please enter Email!"></td> </tr>
<tr><td>&nbsp;</td>
  <td><input name="submit" type="SUBMIT" value="SUBMIT" >  
    <input type="Submit" name="Delete" value="DELETE" onClick="return 
confirmSubmit()"></td></tr>
</table>
</cfoutput>
</cfform>
<cfinclude template="footer.cfm">



Updateovers.cfm:-

<!--- cfparams to prevent errors on the page --->
<cfparam name="FORM.email" default="">
<cfparam name="FORM.dateentered" default="">
<cfparam name="form.jobn" default="">
<cfparam name="form.Customername" default="">
<cfparam name="form.quantity" default="">
<cfparam name="form.shipqty" default="">
<cfparam name="form.oversby" default="">
<cfparam name="form.customerServiceRep" default="">
<cfparam name="form.Submit" default="">

<cfoutput>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<cfmail         to="form.email" 
                        from="session.auth.email"
                        subject="Overs Form"
                        type="html"
                        server="smtp.mail.anet.com">
</cfmail>
<body>
<font face="Arial,Helvetica,sans-serif">
<h3>Overs Form </h3>
<table  border="2" bgcolor="silver" cellpadding="2" cellspacing="0">
<tr><td><strong>Date Entered</strong></td><td>#form.dateentered#</td></tr>
<tr><td><strong>Job No.</strong></td><td>#form.jobn#</a></td></tr>
<tr><td><strong>Customer Name </strong></td><td>#form.Customername#</td></tr>
<tr><td><strong>Card Description</strong></td><td>#form.CardDescp#</td></tr>
<tr><td><strong>Total Quantity</strong></td><td>#form.quantity#</td></tr>
<tr><td><strong>Total Quantity Shipped</strong></td><td>#form.shipqty#</td></tr>
<tr><td><strong>Overs  10% By</strong></td><td>#form.oversby#</td></tr>
<tr><td><strong>Ship Overs </strong></td><cfif 
isDefined('form.shipovers')>'Yes'<cfelse>'No'</cfif>
<tr><td><strong>Customer Service 
Rep</strong></td><td>#form.customerServiceRep#</td></tr>
</table>
</font>
</body>
</html> 
</cfoutput>

<cflocation url="oversform.cfm" >
<cfabort>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258857
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to