Class DocxFormField
- Namespace
- DocToolkit
- Assembly
- DocToolkit.Docx.dll
One content control, and its current content.
public sealed class DocxFormField
- Inheritance
-
DocxFormField
- Inherited Members
Properties
Alias
The control's display name (w:alias) — what Word itself shows a human (A120).
public string Alias { get; }
Property Value
Remarks
This is not Key. The key is whichever name DocxFormKey resolved for matching, and is usually the tag — an identifier the template's author chose for code. The alias is the label, and an application rendering a form wants this one.
Empty when the control has no alias, and also when the key is ambiguous. Word does not require either name to be unique; where one reaches two controls with different aliases, this says nothing rather than picking one and being silently wrong half the time. DocxFormValidation reports that case as DuplicateKey.
Whether the control is LOCKED is still not reported. Measured 2026-09-03: OfficeIMO
exposes the alias but neither the lock nor the element to read one from. Since 0.54.0
Fill refuses to write a locked control, so the lock is at least safe to discover by
attempting the fill.
Key
The name this control answers to.
public string Key { get; }
Property Value
Value
What the control holds now — the same type DocxForm.Fill takes, so a round trip
needs no translation.
public DocxFormValue Value { get; }