<format> (Text Box Form Field Formatting)

This element specifies the field formatting which shall be applied to the contents of the parent form field whenever those contents are modified. The type of formatting which is applied to the field depends on the value of its <type> element (§2.16.34), as follows:

  • When the <type> is equal to currentDate, currentTime, or date, a date formatting string using the syntax defined in §2.16.4.1

  • When the <type> is equal to calculated or number, a number formatting string using the syntax defined in §2.16.4.2

  • When the type is equal to regular, a text formatting string defined as follows:

Argument

Description

Uppercase

All letters are uppercase.
example: : Mary Smith results in MARY SMITH.

Lowercase

All letters are lowercase.
example: : Mary Smith results in mary smith.

First capital

Capitalizes the first letter of the first word.
example: : Mary Smith results in Mary smith.

Title case

Capitalizes the first letter of each word.
example: : Mary Smith results in Mary Smith.
example:
<w:ffData>
  <w:textInput>
    <w:type w:val="number" />
    <w:maxLength w:val="4" />
    <w:format w:val="0.00" />
  </w:textInput>
</w:ffData>

The <format> element specifies the field formatting which is applied to the input to the field (in this case, a grouping of number formatting picture items as the <type> element specifies a value of number). If a value of 8 was entered into this field, the formatted result would be 8.00. ]

Parent Elements

<textInput>2.16.33)

Attributes

Description

<val> (String Value)

Specifies that its contents will contain a string.

The contents of this string are interpreted based on the context of the parent XML element.

<w:pPr>
  <w:pStyle w:val="heading1" /> 
</w:pPr>

The value of the @val attribute is the ID of the associated paragraph style's styleId.

However, consider the following fragment:

<w:sdtPr>
  <w:alias w:val="SDT Title Example" />
  ...
</w:sdtPr>

In this case, the decimal number in the @val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. ]

The possible values for this attribute are defined by the ST_String simple type (§2.18.89).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_String">
	<attribute name="val" type="ST_String" use="required"/>
</complexType>