Making a form is the easy part, especially with Dreamweaver. The hard part is getting them to work properly.
Web Form Aids
DMXzone has a Free CSS Form Designer Extension... To get the extension all you need to do is sign up, download and install dmxCssFormDesigner
On line Form Generator in html/XHTML and CSS
Accessify.com's web site has an html/XHTML web form builder that includes some CSS for styling.
There are many free form sites available this is just one... http://www.emailmeform.com/v-samples.html
This link takes you to their sample page. For simple forms you can use their "free" service, But these services can get real expensive with weekly and monthly fees if you want more features...
Note the use of Captcha to block spam email
Freedback has their own way of "doing" security as you'll soon see...
You will need to make several supporting Web Pages
Always put the buttons or selection boxes on the left.
Solution 1 Use your Hosts Form Mail script.
I asked you to find out if your host supports Form Mail and provides you with a server-side script. The reason for that is that in Internet Explorer the form "action" below doesn't always work, and using "Mailto:your@emailaddress.com" leaves your e-mail address exposed to SPAM attacks.
<form action="mailto:your@email.address" method="POST" enctype="text/plain">
Solution 2 A simple php script
If your host supports php or CGI (Computer Gateway Interface) scripts you can use the following script...
A simple php script
----->snip cut and paste into a text editor
<?php
//----You just need to CHANGE the paramaters IN RED--------------------------// Subject of email sent to you.
$subject = 'Newsletter Contact info';// Your email address. This is where the form information will be sent.
$emailadd = 'Your-e-mail address here between the single quotes!';// Where to redirect after form is processed includes path and name of the file.
$url = '../thankyou.html';// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "$key is empty";die;}
}
$j = strlen($key);
if ($j >= 30)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 30 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?><-----------snip
Save the file as "sendform.php" and upload it to your web site with your forms...
Actually, the proper place for a php script, should be a folder called "cgi-bin" at the TOP level above the root folder of your website
Files in a cgi-bin folder are executed, not read... and are safe from prying eyes...
In your Form page add this
<form action="sendform.php" method="post" enctype="multipart/form-data"
Where action="path and name of the above file sendform.php" If the form is located in a folder in the root of your web site, the path would be, "../cgi-bin/sendform.php"
You may have to add another "../" to the path... you'll have to experiment to find the correct path
Test it
There are more "complete" free scripts and forms available on the internet... Some include "captcha" for security and other functions...
Solution 3
Make your own form, but Use information from a 3rd party Form
Make your form and then make an identical form from
"Freedback"
For the PC Coffee Cup Form Builder $39.00
For the Mac and PC (Your host needs to have PHP installed )
BestWebForms This form builder is template and web based.
bestwebforms is Currently $19.95 You'll need to be able to FTP, and know how to set permissions.