w:fldSimple (Simple Field)

Represents a simple field with a self-contained instruction string and optional cached display value.

Parent elements

Child elements

Description

w:fldSimple is the simple field element, combining the field instruction and its result in a single element (as opposed to the three-element begin/separate/end pattern). It is defined in ECMA-376 Part 1 §17.16.19.

The field instruction is stored in the w:instr attribute. Any run children of w:fldSimple contain the cached field result. Unlike complex fields (w:fldChar), the instruction and result are both in the same element.

Attributes

Attribute Type Possible Values Description
w:instr ST_String A field instruction string, e.g. " DATE \\@ "MMMM d, yyyy" ", " REF bookmark ". The field instruction.
w:dirty ST_OnOff true / false When true, the field result should be updated before display.
w:fldLock ST_OnOff true / false When true, the field result is locked and not updated.

Examples

<!-- Simple date field -->
<w:fldSimple w:instr=" DATE \@ "MMMM d, yyyy" ">
  <w:r>
    <w:t>January 15, 2024</w:t>
  </w:r>
</w:fldSimple>