Dreamweaver

Insert ColdFusion select boxes

You can visually insert a ColdFusion select box into your form and set its properties. A select box lets a visitor select one or more items from a list. Select boxes are useful when you have a limited amount of space, but need to display many items. They’re also useful when you want to control the values returned to the server. Unlike text fields, where users can type anything they want, including invalid data, with select boxes, you can set the exact values returned by a menu.

You can insert two types of select boxes into a form: a menu that “drops down” when the user clicks it, or a menu that displays a scrollable list of items that the user can select.

Note: This enhancement is available only if you have access to a computer running ColdFusion MX 7 or later.
  1. Place the insertion point inside the form outline.
  2. In the CFForm category of the Insert bar, click the CF Select icon.

    A select box appears in the ColdFusion form.

  3. Select the select box on the page and set any of the following options in the Property inspector:
    Cfselect
    lets you specify a unique name for the control.

    Type
    Lets you choose between a pop‑up menu or a list. If you select the list type, the List Height and Allow Multiple List Selections options become available.

    List Height
    Lets you specify the number of lines to display in the list menu. Available only if you select the list type.

    Allow Multiple List Selections
    Lets you specify whether the user can select more than one option from the list at a time. Available only if you select the list type.

    Edit Values
    Opens a dialog box that lets you add, edit, or remove options from the select box.

    Initially Selected
    Lets you specify which option is selected by default. You can select more than one option if you selected the Allow Multiple List Selections option.

    Recordset
    Lets you specify the name of the ColdFusion query you want to use to populate the list or menu.

    Display Column
    Lets you specify the recordset column to supply the display label of each list element. Used with Recordset property.

    Value Column
    Lets you specify the recordset column to supply the value of each list element. Used with the Recordset property.

    Flash Label
    Lets you specify a label for the select box.

    Flash Height
    Lets you specify the height of the control, in pixels. This property is ignored by the ColdFusion server at run time.

    Flash Width
    Lets you specify the width of the control, in pixels. This property is ignored by the ColdFusion server at run time.

    Message
    Specifies the message to be displayed if the Required property is set to Yes and the user failed to make a selection before submitting the form.

    Required
    Lets you specify whether a menu item must be selected before the form is submitted to the server.

    Display Tag Editor
    Lets you edit properties not listed in the Property inspector.