To create a form in Dreamweaver follow these steps: I. Creating a Basic Web Form Page: 1. Select View>Visual Aids>Invisible Elements. 2. Make sure the Properties Inspector is open. 3. Position the cursor and select Insert>Form. 4. In the Properties Inspector, enter the following in the Action field: /cgi/formmail 5. In the Properties Inspector, set the Method drop down menu to Post. 6. Place the cursor within the form (i.e., within the red box).
Warning: For a form to work, all form objects must be placed within the red box. (If you look at the code, you'll see this means between the <form> and </form> tags.)
7. Select Insert>Form >Hidden Field. 8. In the Property Inspector's HiddenFields field, enter "recipient". 9. In the Property Inspector's Value field, enter the email address such as:
Note: To use an image instead of a regular submit button, do the following: 1. Select>Form>Image Field. 2. Select the image you wish to use from Image Source dialog box that appears. 3. Change the name of the image field to "Submit" like this:
3. Add a second button by selecting Insert>Form >Button. 4. In the Properties Inspector, set the Action radio button to Reset.
This completes the process of permitting readers to submit information using a form/
In addition to what this form does to this point, FormMail can process a number of optional hidden fields. Here are two of the most useful (check the full documentation for others).:
Preview your page, test the form, and check your email to look at the results FormMail generates. Troubleshooting Tips: Once you have created and published your web form according to the instructions above, you should test your web form. If you are not receiving emailed copies of the webforms submitted from your website, click here for troubleshooting tips. Troubleshooting Tips: Once you have created and published your web form according to the instructions, you should test your web form. If you are not receiving emailed copies of the webforms submitted from your website, click here for troubleshooting tips. yourname@yourdomain.com This completes the basics-creating a form, setting its action, and sending it.
II. Insert Text fields, Checkbxes, Buttons, and other Objects:
To have a user type in information, use Text Field or Textarea:
1. Within the red box, position the cursor and insert the text that tells users what kind of information to enter in the field (for example, "Your Name" or "Your Phone Number"). 2. Select Insert>Form >Text Field. 3. In the Properties Inspector, set the TextField field to what will identify the information being entered. (eg. PHONE:, NAME:)
To have users choose one or more possibilities, use Check Box:
Warning: Repeat the following steps for each checkbox:
1. Position the cursor and insert the text that tells users what choice the next check box represents (for example, "toys," or "copmuters,"or "food"). 2. Select Insert>Form >Check Box. 3. In the Properties window, fill in the Label and Value fields. The Label is what will identify the check box and the value indicates if it were checked.
For example, if you set the Label of a checkbox to "toys ," that's what would be sent back to you if the user checks "Pepperoni." if you set the Value of a checkbox to "Yes," that's what you would get back if the user enabled the checkbox. Together, you would receive this:
toys = Yes
4. Repeat Steps 1-3 for each check box.
To have users choose only a single item from a set of choices, use radio buttons. Here's how:
1. Select Insert>Form>Radio Group. The Radio Group dialog box appears. 2. In the Name field, enter a meaningful name for the radio group (like Color). 3. For each radio button: In the Label field, enter the text that will appear on the page.This will let you identify the radio group when you receive the message from Formmail. 4. For each radio button: In the Value field, enter the same text as in Step 3. This will let you identify which button in the radio group the user selected.
For example, if you set the Name of radio group to "Clothes" and set up buttons for hat, pants, and shirt, this is what you'd see on the page:
hat pants shirt Below is what would get emailed to you: Clothes = pants
Warning: Dreamweaver's radio group generates only two radio buttons. Click the + button to add others.
This completes creating the objects with which readers will interact.
Add Buttons
You now need a way for readers to send the form's information using our pre-installed formmail script. Buttons let users submit the information or reset the form to its original state. Here's how to insert them:
1. Select Insert>Form>Button. 2. In the Properties Inspector, set the Action to Submit.
|
|
Article
|
708
|
|
Created
|
4-18-2006
|
|
Modified
|
7-10-2006
|
|
Author
|
Netfirms
|
|