Adobe COLDFUSION 9 Manual page 715

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
<cfinput type="Text" name="FirstName" size="20" maxlength="35" required="Yes"
message="You must enter your first name.">
If you use a hidden field tag, you customize the message using the
<input type="hidden" name="FirstName_required"
value="You must enter your first name.">
Form variable notes and considerations
When using form variables in an action page, keep in mind the following guidelines:
• A form variable is available on the action page and pages that it includes.
• Prefix form variables with "Form."when referencing them on the action page.
• Surround variable values with number signs (#) for output.
• Variables for check boxes, radio buttons, and list boxes with
action page if you select an option. Text boxes, passwords, and text area fields pass an empty string if you do not
enter text.
• An error occurs if the action page tries to use a variable that was not passed.
• If multiple controls have the same name, one form variable is passed to the action page with a comma-delimited
list of values.
• You can validate form variable values on the client or the server.
Working with queries and data
The ability to generate and display query data is one of the most important and flexible features of ColdFusion. Some
of these tools are effective for presenting any data, not just query results.
Using HTML tables to display query results
You can use HTML tables to specify how the results of a query appear on a page. To do so, you place the
inside the table tags. You can also use the HTML
table for each row in the query results, place the
In addition, you can use CFML functions to format individual pieces of data, such as dates and numeric values.
Place the query results in a table
1
Open the ColdFusion actionpage.cfm page in your editor.
Modify the page so that it appears as follows:
2
attribute of the hidden field, as follows:
value
attributes greater than 1 only get passed to the
size
tag to place column labels in a header row. To create a row in the
th
block inside the
tr
cfoutput
Last updated 8/5/2010
cfoutput
tag.
710
tag

Advertisement

Table of Contents
loading

Table of Contents