ColdFusion provides form group container types that provide basic structure to a Flash form. You specify these types in the type
attribute of the cfformgroup
tag. Use the following container types to control the layout of controls and groups of controls:
Type | Description |
---|---|
|
Arranges individual controls horizontally, and optionally applies a label to the left of the controls. Use only for arranging ColdFusion form controls, including If you put other |
|
Arranges individual controls vertically, and optionally applies a label to the left (not top) of the controls. Use only for groups of ColdFusion form controls, including If you put other |
|
Arranges groups of controls horizontally. Does not apply a label. Use this attribute value to arrange other |
|
Arranges groups of controls vertically. Does not apply a label. Use this attribute value to arrange other |
|
Arranges two or more children horizontally, and puts divider handles between the children that users can drag to change the relative sizes of the children. Does not apply a label. The direct children of an |
|
Arranges two or more children vertically, and puts divider handles between the children that users can drag to change the relative sizes of the children. Does not apply a label. The direct children of a |
|
Arranges its children in a rectangular grid in row-first order. Does not apply a label. |
|
Consists of a title bar containing the |
|
Puts each of its child pages in an accordion pleat with a label bar. Displays the contents of one pleat at a time. Users click the labels to expand or contract the pleat pages. Does not apply a label. |
|
Puts each of its children on a tabbed page. Users click the tabs to display a selected page. Does not apply a label. |
|
The immediate child of an accordion or tab navigator container. Specifies the label on the pleat bar or tab, and arranges its child containers and controls vertically. |
For more information on using the accordion
, tabnavigator
, and page
cfformgroup
types, see Creating complex forms with accordion and tab navigator containers.
The following example shows a form with an hdividedbox
container with two vbox
containers. The left box uses a horizontal
container to arrange two radio buttons. The right box uses a tile
container to lay out its check boxes. You can drag the divider handle to resize the two boxes. When you submit the form, the ColdFusion page dumps the Form scope to show the submitted data.
<cfif Isdefined("Form.fieldnames")> <cfdump var="#form#" label="form scope"> <br><br> </cfif> <cfform name="myform" height="200" width="460" format="Flash" skin="HaloBlue"> <cfformitem type="html" height="20"> <b>Tell us your preferences</b> </cfformitem> <!--- Put the pet selectors to the left of the fruit selectors. ---> <cfformgroup type="hdividedbox" > <!--- Group the pet selector box contents, aligned vertically. ---> <cfformgroup type="VBox" height="130"> <cfformitem type="text" height="20"> Pets: </cfformitem> <cfformgroup type="vertical" height="80"> <cfinput type="Radio" name="pets" label="Dogs" value="Dogs" checked> <cfinput type="Radio" name="pets" label="Cats" value="Cats"> </cfformgroup> </cfformgroup> <!--- Group the fruit selector box contents, aligned vertically. ---> <cfformgroup type="VBox" height="130"> <cfformitem type="text" height="20"> Fruits: </cfformitem> <cfformgroup type="tile" height="80" width="190" label="Tile box"> <--- Flash requires unique names for all controls ---> <cfinput type = "Checkbox" name="chk1" Label="Apples" value="Apples"> <cfinput type="Checkbox" name="chk2" Label="Bananas" value="Bananas"> <cfinput type="Checkbox" name="chk3" Label="Pears" value="Pears"> <cfinput type="Checkbox" name="chk4" Label="Oranges" value="Oranges"> <cfinput type="Checkbox" name="chk5" Label="Grapes" value="Grapes"> <cfinput type="Checkbox" name="chk6" Label="Cumquats" value="Cumquats"> </cfformgroup> </cfformgroup> </cfformgroup> <cfformgroup type="horizontal"> <cfinput type="submit" name="submit" width="100" value="Show Results"> <cfinput type="reset" name="reset" width="100" value="Reset Fields"> </cfformgroup> </cfform>