Operation Manual
To the top
To the top
1. Select a check box form object on your page.
2. In the Property inspector, click the Dynamic button.
3. Complete the Dynamic CheckBox dialog box, and click OK:
Click the lightning bolt icon beside the Check If box and select the field from the list of data sources.
The data source must contain Boolean data such as Yes and No, or true and false. If no data sources appear in the list,
or if the available data sources don’t meet your needs, click the Plus (+) button to define a new data source.
In the Equal To box, enter the value the field must have for the check box to appear selected.
For example, for the check box to appear selected when a specific field in a record has a value of Yes, enter Yes in the
Equal To box.
Note: This value is also returned to the server if the user clicks the form’s Submit button.
Dynamically preselect an HTML radio button
Dynamically preselect an HTML radio button when a record is displayed in the HTML form in a browser.
Before you begin, you must create the form in a ColdFusion, PHP, or ASP page, and insert at least one group of HTML radio buttons (Insert >
Form > Radio Group). You must also define a recordset or other source of dynamic content for the radio buttons. Ideally, the source of content
should contain Boolean data, such as Yes/No or true/false.
1. In Design view, select a radio button in the radio group.
2. In the Property inspector, click the Dynamic button.
3. Complete the Dynamic Radio Group dialog box, and click OK.
Set the Dynamic Radio Group dialog box options
1. In the Radio Button Group pop-up menu, select a form and radio button group in the page.
The Radio Button Value box displays the values of all radio buttons in the group.
2. Select a value to dynamically preselect from the list of values. This value is displayed in the Value box.
3. Click the lightning bolt icon beside the Select Value Equal To box and select a recordset that contains possible checked
values for the radio buttons in the group.
The recordset you select contains values that match the radio buttons’ checked values. To view the checked values of the
radio buttons, select each radio button and open its Property inspector (Window > Properties).
4. Click OK.
Set the Dynamic Radio Group dialog box options (ColdFusion)
1. Select a radio group and form from the Radio Group pop-up menu.
2. Click the lightning bolt icon next to Select Value Equal To box.
3. Complete the Dynamic Data dialog box, and click OK.
a. Select a data source from the list of data sources.
b. (Optional) Select a data format for the text.
c. (Optional) Modify the code that Dreamweaver inserts in your page to display the dynamic text.
4. Click OK to close the Dynamic Radio Group dialog box, and insert the dynamic content placeholder in the Radio Group.
Validate HTML form data
Dreamweaver can add JavaScript code that checks the contents of specified text fields to ensure that the user has entered the correct type of
data.
You can use Spry form widgets to build your forms and validate the contents of specified form elements. For more information, consult the Spry
topics listed below.
You can also build ColdFusion forms in Dreamweaver that validate the contents of specified fields. For more information, consult the ColdFusion
chapter listed below.
1. Create an HTML form that includes at least one text field and one Submit button.
Make sure every text field that you want to validate has a unique name.
2. Select the Submit button.
3. In the Behaviors panel (Window > Behaviors), click the Plus (+) button and select the Validate Form behavior from the list.
4. Set the validation rules for each text field, and click OK.
535