About building forms, Using forms to collect information from users – Adobe Dreamweaver CC 2015 User Manual
Page 611
604
Dynamic sites, pages and web forms
Last updated 6/3/2015
• Apply the server behavior again and enter invalid data in each field of the dialog box. Try leaving the field blank,
using large or negative numbers, using invalid characters (such as /, ?, :, *, and so on), and using letters in numeric
fields. You can write form validation routines to handle invalid data (validation routines involve hand-coding, which
is beyond the scope of this book).
After successfully applying your server behavior to the page, verify the following:
• Check the Server Behaviors panel to make sure the name of the server behavior appears in the list of behaviors added
to the page.
• If applicable, verify that server-side script icons show up on the page. The generic server-side script icons are gold
shields. To see the icons, enable Invisible Elements (View > Visual Aids > Invisible Elements).
• In Code view (View > Code), verify that no invalid code is generated.
In addition, if your server behavior inserts code in the document establishing a connection to a database, create a
test database to test the code inserted in the document. Verify the connection by defining queries that produce
different sets of data, and different sizes of data sets.
Finally, upload the page to the server and open it in a browser. View the page’s HTML source code and verify that
no invalid HTML has been generated by the server-side scripts.
More Help topics
About building forms
Note: The user interface in Dreamweaver CC and later has been simplified. As a result, you may not find some of the
options described in this article in Dreamweaver CC and later. For more information, see
When a visitor enters information into a web form displayed in a web browser and clicks the submit button, the
information is sent to a server where a server-side script or application processes it. The server responds by sending the
processed information back to the user (or client), or by performing some other action based on the form’s contents.
You can use Dreamweaver to create forms that submit data to most application servers, including PHP, ASP, and
ColdFusion. If you use ColdFusion, you can also add ColdFusion-specific form controls to your forms. Your forms can
have text fields, password fields, radio buttons, check boxes, pop-up menus, clickable buttons, and other form objects.
Dreamweaver can also write code that validates the information a visitor provides. For example, you can check that an
e-mail address that a user enters contains an “@” symbol, or that a required text field contains a value.
Note: Support for ColdFusion and ASP is removed in Dreamweaver CC and later.
Using forms to collect information from users
Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the
options described in this article in Dreamweaver CC and later. For more information, see