How to Create a Media Query in Dreamweaver
How to Apply CSS3 Effects and Transforms in Dreamweaver
How to Transfer Files to Your Website with Dreamweaver

How to Create a Form in Dreamweaver

Dreamweaver doesn't make building a basic form much easier than coding it directly in HTML. It’s not like typing <form takes a lot longer than choosing Insert→Form→Form. The real value of Dreamweaver lies in seamlessly generating JavaScript for validation scripts and jQuery Mobile form elements. To make those scripts work, though, you need to set up a form correctly in Dreamweaver.

Here comes the obligatory warning that precedes every discussion of how to do anything in Dreamweaver: Stop. If you’re not working in a defined Dreamweaver site — as defined in the Site Definition dialog box — none of this will work.

With a site defined, and an HTML page saved in Dreamweaver, following these steps will create a form:

1

Click in your document to set your cursor at the insertion point in an HTML document where the form will appear and choose Insert→Form→Form.

If you’re in Code view, the Tag Editor – Form dialog box appears; click OK to make it disappear because you don’t need it.

2

Click OK to embed the form.

The form appears in Design view in a red box. With the red box selected, the Properties Inspector displays settings for the form.

3

In the Action field of the Properties Inspector, enter an action.

This could be a link to a PHP script or an e-mail action.

4

If you’re sending form content by e-mail, enter text/html in the Enctype field.

Red lines in Design view define the beginning and end of the form element, and <form> and </form> tags in Code view do the same thing. Stay inside the form element when adding all form elements!

blog comments powered by Disqus
How to Remove Unwanted Formatting from Your Website
How to Edit New Pages with Dreamweaver
How to Add a DOCTYPE in Dreamweaver
CSS Code Hinting in Dreamweaver
How to Upload Your Website with Dreamweaver
Advertisement

Inside Dummies.com