Accessibility

TechNote

How to develop a form in Dreamweaver

How to develop a form in Dreamweaver

Since HTML 2.0, there have been HTML elements designated specifically for use with forms. These HTML elements are fully supported by Dreamweaver as form objects (Insert > Form Object or Insert > Form). The form objects are the input fields of a finished form, and Dreamweaver displays them in the Document window to help with the design of the form.

Designing the layout of a form on the HTML page is only one part of form development. Passing the visitor's input from the form to a database (or sending the data to a specified e-mail address) is best handled by a third-party script, such as a CGI script, or by server scripting such as ASP or ColdFusion. This TechNote describes the simple creation of a form on a page. The Additional information section includes links to resources that describe formatting choices and processing choices.

How the form tag works
  • All form elements must be contained within a Form tag. The placement of the Form tag is easy to see if viewing invisible elements is enabled (View > Invisible Elements) in the Document Window. The presence of the Form tag in the simple form below is represented by the red-dashed line.

  • Clicking the red-dashed line selects the Form tag. With the Form tag selected, the Property inspector displays the properties for the entire form:

    • Form Name: Typically, a form will require a name if using a CGI script, so it is good practice to name the form. In this case, the name of the form is formtest. Note that there are no spaces or unusual characters in the name.

      See Naming strategies for Dreamweaver, UltraDev, and various interpreters (TechNote 14610) for more information on naming files and folders.
    • Action: The action of a form will be the address to the CGI script, if using a CGI script. Use the file folder icon to browse to the CGI script, or use the full absolute path if the CGI script is located outside of the site root folder. If using an absolute path, the path must begin with http://. The form's Submit button submits the form to the program specified in the form's Action attribute.
    • Method: The method of a form determines how the data will treated. The Default method will be treated the same as selecting the GET method. Unless instructed otherwise, the typical Method attribute for a form is POST.
Additional information

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_14950
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox
Database:DB2
Informix
MySQL
Oracle
SQL Server
Sybase
MS Access

Products Affected:

dreamweaver