(Answer) (Category) Accessing Services at OA5 / YASK / Irial : (Category) My Website : (Answer) Setting up a form on your Website using Dreamweaver

Answer by Monica Horten

This tells you how to create a form for subscribers to fill in and request information from you on your website. It is written for OA5.com customers - and contains information which is specific to the OA5.com web servers.

There are other different kinds of forms that you can create - they are not covered here.
  1. In Dreamweaver, set the view to "Code and Design".
  2. Insert a new form in the position on the page where you want it.
  3. Give the form a name. Click in the form outline ( you need "hidden detail" turned on to see this, and the outline will be red dotted line). At the bottom of the screen, in the Properties box, you will see a field for "Form name" - change "form1" to whatever you want eg 'inforequest'
  4. You need to tell the server how to process your form. The processing is done by your CGI Formmail script. In most cases, you will want it to email the data to you. Thus, in the 'Action' box, type the URL for your CGI bin. Do check with OA5 what this should be if you are not sure, but the standard format for OS5.com is http://www.yourdomain.com/cgi-bin/formmail
  5. Next, make a selection in the "Method" "target" and Enctype" boxes. If you want the server to send you an email with the subscriber's details, then select as follows: Target = Blank and Enctype = "application/x-www-form-urlencoded"; Method = POST;
  6. THEN go to 'View Code' and immediately after a line that looks like this:
    <form action="http://www.your domain.com/cgi-bin/formmail" method="post" enctype="application/x-www-form-urlencoded" name="yourformname" target="_blank" id="yourformname" >
    insert the following line:
    <input name="recipient" type="hidden" value="your.email@yourdomain.com">
  7. If you want people to fill in name, address, etc, create "text fields" for each one. Type some meaningful text next to each field. This will tell the user what you want them to enter. And then go to 'textfield' in the Properties box, and type in a name for your field. This will remind you of what each text box is collecting, when you receive the emailed details. For example, if you want people to name their organisation, create a text field labelled 'Organisation, and give it the name 'Organisation' in the Properties box. You will see a line like this in the code:
    <input type="text" name="organisation">
  8. To get drop-down boxes or buttons, just select the appropriate one from the menu, and enter the selections as 'values'.
  9. When you have finished designing the form fields, you need a submit button. Select 'Button' from the menu, and Dreamweaver should do this for you. You can alter the text on the button, if it does not automatically say 'Submit'.
  10. Test the form by setting up a preview page and filling in the form yourself. If you receive an email, the form has worked. If you don't receive an email, you should check the code in your form.

This is a very basic form. It will email you with the information that the subscriber has filled in. If you want to do more fancy things, like a thank-you page or mandated fields, we have found the following sites to be of assistance.


[Append to This Answer]
supportAToa5DOTcom
2005-Nov-26 13:54
Previous: (Answer) How do I set up Scripts
Next: (Answer) How do I debug Scripts?
This document is: http://faq.oa5.com/cgi-bin/fom?file=72
[Search] [Appearance]
This is a Faq-O-Matic 2.714.