HTML Forms

HTML 2.0 supports a relatively complete set of user-interface widgets which can be integrated into HTML pages. These widgets include single and multi-line text boxes, list boxes, radio buttons, and check boxes. These input forms are used extensively in Cold Fusion applications.

This User Guide assumes that you either already understand how to create HTML forms or have ready access to documentation which can help you get up to speed. A good introductory tutorial on forms is available on-line at http://robot0.ge.uiuc.edu/~carlosp/cs317/ft.1.html. A page containing links to more information on forms is located at http://www.stars.com/Vlib/Providers/Forms.html.


Database Markup Language

The key to dynamic page generation is a small but powerful set of database-oriented markup tags. These tags are collectively referred to as DBML (Database Markup Language). DBML tags are similar to HTML tags but are database oriented. Learning to use the DBML tags is simple. Almost all of the core functionality of Cold Fusion is encapsulated in the four tags listed below:

Tag               Purpose                                                   
DBQUERY           Submits an SQL query to the database.                     

DBOUTPUT          Displays the result of a query, freely intermixing        
                  result set fields and HTML tags.                          

DBTABLE & DBCOL   Displays a preformatted table containing the result set   
                  of a query.                                               

In Cold Fusion applications, dynamic pages are created using template files, which are composed of a mix of HTML and DBML tags:

  • The HTML tags are used both for implementing the non-database driven parts of your output (e.g. page header and footer) as well as for specifying how you want the results of your queries formatted. For example, you might specify that you want a field bolded or a horizontal rule drawn between each record displayed.

  • The DBML tags are used to specify the queries you want sent to the database as well as where and how you want to display the results of your queries. For example, you might specify that you want the SQL query "SELECT * FROM Customers" sent to the database and the results sent back to the user as a preformatted table.