Controlling the HTML generated for a field

About this task

With Release 8, Domino® adds the ability to change the HTML generated at both the form and individual field level. Note that these options are not included in the HTML (see "Adding HTML attributes to a field" for attributes included in the HTML) but control how the Domino server translates the field into HTML and how input in that field is processed.

Options are indicated by a list of name=value pairs. The name consists of alphanumeric characters (letters, numbers, underscore, dash), and indicates the option that is being set. The value is a number, and indicates the setting of that option.

The HTML options for a specific field are stored in a matching text field, named $$HTMLOptions_fieldname. If more than one HTML option is to be set for that field, the field must be set to allow multiple values.

Field-level HTML options will override form-level HTML options.

Disabling passthru HTML in a field

About this task

In addition to disabling passthru HTML at the server level, with Release 8, Domino adds the ability to disable passthru HTML for a single field. When passthru HTML is disabled, any HTML enclosed in the passthru HTML tags, [< and >], is treated as regular text.

Procedure

  1. Create the field for which you want passthru HTML disabled.
  2. Create a computed for display, hidden text field named $$HTMLOptions_fieldname.
  3. Specify the value of the text field, based on how much passthru HTML to disable.
    • To allow all passthru HTML, specify "DisablePassThruHTML=0".
    • To disable only the [< and >] tags, specify "DisablePassThruHTML=1".
    • To indicate passthru HTML with the Notes® editor paragraph style html, specify "DisablePassThruHTML=2".
    • To mark passthru HTML with the richtext passthru attribute, specify "DisablePassThruHTML=4".
    • To disable all passthru HTML, indicate the passthru HTML with the Notes editor paragraph style html, and mark the passthru HTML with the richtext passthru attribute, specify "DisablePassThruHTML=7".
      Note: Because this setting overrides the server setting for disabling passthru HTML on this specific field, specifying a value of 0 will allow HTML to passthru for this field even if the the server has set DominoDisablePassThruHTML to disable passthru HTML.

Results

This setting affects rendering (Web server generated output), not input. Thus, someone can still post an item that has the passthru HTML in it, but it won't be interpreted as such when the Web server generates output HTML.

Field-level setting of DisablePassThruHTML does not affect:

  • if and how the Notes client treats passthru HTML.
  • other ways of putting "raw" HTML into a document (for example, marking a form as content type HTML or putting a field named HTML on the document).