|
|
Using ColdFusion Email Script Step 1: Create your form Here is the HTML for a sample form:
Just copy the text in the box above and paste it into the HTML of a blank web page. If your are using FrontPage, you will need to click on the HTML tab located beside the Normal and Preview tabs in the bottom left corner before you paste the text. Step 2: Create the mailto to Script Here is an example of an easy Cold Fusion mailto Script that works with the
sample form above. The entries in CAPITAL LETTERS are the ones you replace with your information.
You will also be filling in the body of the script based on the fields you use
in your form. This is explained in detail below. The form above is only a sample
form. You can add more fields, remove fields, and/or rename fields.
The basics are pretty clear here. Just copy the text in the box above and paste it into NOTEPAD. Do not use a word
processor like Microsoft Word or Works. This will add extra formatting characters that the script will not recognize. The body part of the email will list the form field names. Let's say you have the following form field names: FirstName, LastName, Address, Email. The body part of the email would appear as:
The #form part inserts the form field data that the customer entered in the form. The form fields you use for your form do not have to include the same fields and field names as the examples given above. You can use any number of fields and various types of field names as long as the names do not contain any spaces. If you did not use the sample form, but instead created your form from scratch in FrontPage, the easiest way to get a complete list of all the fields in your form is to view the for properties: Right click on the form and choose "Form Properties" from the menu. Select the "Options" button in the bottom left. Click on the last tab called "Saved Fields". You will see a complete list of all the fields used in your form. Copy these field names and add them to your email script body as explained above.
Remember that the form field names are case sensitive. That means that #form.firstname# is not the same as #form.FirstName#. Also, make sure there are no spaces or dashes in your form field names.
This mail script does not recognize radio buttons or check boxes. You will have
to use text boxes, scroll boxes, or drop down boxes only. If you use multiple forms on your web then you will need to create a new FILENAME.cfm for each form using this script. For FrontPage Users For people using FrontPage you will need to set the action and method part of the form using the Form Properties. In FrontPage go to your form and right click on it. Choose "Form Properties" from the menu. The following screen will appear:
You will need to select "Where to store
results" as "Send to other" as show in the picture above
Type FILENAME.cfm (change to whatever you called your script) into the Action box and select the Method as Post. Your script and form should be finished now and ready to use on your web page. If you use multiple forms on your web then you will need to create a new FILENAME.cfm for each form using this script.
1PlanHost provides affordable Windows 2003
ASP, ASP.NET and FrontPage Web Hosting solutions for thousands of
companies and non-profit organizations worldwide. With our
Windows 2003 hosting 100% Uptime and 45 Day Full Money
Back Guarantee,
it is hard to beat us in terms of reliability and value. Since
1996 our
commitment has been to provide customers with the most reliable servers and outstanding support.
Sign up
now to begin your positive Windows 2003 web hosting experience with 1PlanHost.com
An innovative Windows 2003
Resellers Web Hosting Program is also available. We are looking forward to serving you!
Darrell Williams
|
![]() Testimonials: "Provides reliable, polite, responsive service at a fair cost, I did not think it was possible."-- Chris Molseed "No extra charge for advanced features, Quick and Accurate Support Responses." -- Michael Harrelson Read more quotes...
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|