Dreamweaver

Use predefined data formats

Dreamweaver includes several predefined data formats that you can apply to dynamic data elements. The data format styles include date and time, currency, numerical, and percentage formats.

Apply data formats to dynamic content

  1. Select the dynamic content in either the Live Data window or its placeholder in the Document window.
  2. Select Window > Bindings to display the Bindings panel.
  3. Click the down arrow button in the Format column.

    If the down arrow is not visible, expand the panel.

  4. From the Format pop‑up menu, select the data format category you want.

    Ensure that the data format is appropriate for the type of data you are formatting. For example, the Currency formats work only if the dynamic data consists of numerical data. Note that you cannot apply more than one format to the same data.

  5. Verify that the format was applied correctly by previewing the page in either the Live Data window or a browser.

Customize a data format

  1. Open a page that contains dynamic data in Design view.
  2. Select the dynamic data whose format you want to customize.

    The bound data item whose dynamic text you selected is highlighted in the Bindings panel (Window > Bindings). The panel displays two columns for the selected item—Binding and Format. If the Format column is not visible, widen the Bindings panel to reveal it.

  3. In the Bindings panel, click the down arrow in the Format column to expand the pop‑up menu of available data formats.

    If the down arrow is not visible, widen the Bindings panel more.

  4. Select Edit Format List from the pop‑up menu.
  5. Complete the dialog box, and click OK.
    1. Select the format from the list, and click Edit.
    2. Change any of the following parameters in the Currency, Number, or Percent dialog boxes, and click OK.
      • The number of digits to display after the decimal point

      • Whether to place a leading zero in front of fractions

      • Whether to use parentheses or a minus sign for negative values

      • Whether to group digits

    3. To delete a data format, click the format in the list, and click the Minus (-) button.

Create a data format

  1. Open a page containing dynamic data in Design view.
  2. Select the dynamic data you want to create a custom format for.
  3. Select Window > Bindings to display the Bindings panel, and click the down arrow in the Format column. If the down arrow is not visible, expand the panel.
  4. Select Edit Format List from the pop‑up menu.
  5. Click the Plus (+) button, and select a format type.
    Note: Dreamweaver only supports creating data formats for ASP and JSP server models. ColdFusion, PHP, and ASP.NET users cannot create data formats from within Dreamweaver.
  6. Define the format, and click OK.
  7. Enter a name for the new format in the Name column, and click OK.
    Note: If you are a ColdFusion, PHP, or ASP.NET extension developer, you can download formats that other developer created, and create server formats and post them to the Dreamweaver Exchange. For more information on the Server Format API, see Extending Dreamweaver (Help > Extending Dreamweaver > Extension APIs > Server Formats).