![]() ![]() ![]() |
The CFFORM tag allows you to create dynamic forms in CFML and gives you access to a wide range of form controls, such as Java applet-based tree, slider, and grid controls, as well as the standard HTML control types like check boxes, radio buttons, text input boxes, and edit boxes. With CFFORM, you gain the advantage of access to these Java applet-based controls without having to know the Java language, and, you don't have to juggle CFOUTPUT tags and HTML FORM tags to reference ColdFusion variables in your forms.
Forms created using the CFFORM tags are structured just as HTML forms. Within the <CFFORM>
and </CFFORM>
tags, you place entries for form controls, such as check boxes and radio buttons (using CFINPUT), data grids (using CFGRID), tree controls (CFTREE), or drop-down lists and select boxes (CFSELECT).
The HTML Reference contains complete online information on the HTML FORM tag. You can open it from the Window Start menu by clicking Welcome to ColdFusion and then selecting it from the Documentation list. You can also open it from the ColdFusion Studio Help References.
You can use the HTML FORM tag in combination with the CFFORM tag. ColdFusion generates HTML forms dynamically from CFFORM tags and passes through to the browser any HTML code it finds in the form. You can also replace your existing HTML FORM tags with ColdFusion CFFORM and your forms will work fine.
Building a form with CFFORM provides the following advantages over building a form using just HTML:
For nearly all CFFORM controls, you can specify font characteristics, alignment, size, scrolling properties, as well as a number of other options.
When you build a form using CFFORM, you typically use one or more of the following controls:
The CFFORM ENABLECAB attribute allows you to improve the performance of Java-applet based CFFORM controls. When you use ENABLECAB, ColdFusion prompts the end user to accept a download of the Java classes needed for the CFFORM controls that use them. CAB files are digitally signed using VeriSign digital IDs to ensure file security.
The ENABLECAB attribute is supported only for MS Internet Explorer clients that have Authenticode 2.0 installed. Authenticode 2.0 can be downloaded from http://www.microsoft.com/ie/security/authent2.htm.
Since each of the Java applet-based controls, CFGRID, CFSLIDER, CFTEXTINPUT, and CFTREE require a Java applet to run, browsers that do not support Java or that have disabled Java execution will not execute the forms that contain these controls. Using the NOTSUPPORTED attribute, ColdFusion allows you to present an error message rather than the blank applet space that appears in the browser. This attribute is available in each of the Java applet-based controls as well as the CFAPPLET tag. You use NOTSUPPORTED to specify the message you want to appear, formatted as HTML, when an application page is loaded by a browser that does not support Java.
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.