Adding HTML attributes to a field

About this task

There are two places to attach HTML to a field. Use the Field Extra HTML tab on the Field Properties box, or use the HTML Attributes field event to attach HTML formatting attributes to editable fields. By adding HTML code to a text field you can, for example, lengthen that field when it is viewed through a browser.

To add HTML attributes using the Field Properties box:

Procedure

  1. Double-click the field you want to format.
  2. Select the Field Extra HTML tab on the Field Properties Box.
  3. In the Other HTML tag field, enter the HTML code (without quotes) -- for example, to resize a text field from its default size of 20):
    SIZE=75 MAXLENGTH=100

    The maxlength value defines the length of the text content a user can enter into the field. Keep the maxlength value approximately 30 percent larger than the size value to enable a user to completely fill a field with text.

  4. Save the form.

To add HTML attributes using the field's HTML Attributes event:

Procedure

  1. Click the field you want to format.
  2. On the Objects tab of the Info List in the Programmer's pane, select the HTML Attributes event for the field.
  3. Write the HTML code in quotes in the Script area -- for example, to define a rich text field's properties:
    "ROWS=10 COLS=20" 
  4. Save the form.