HTML Extended: <phpdocx_mergefield> tag

<phpdocx_mergefield> tag


Inserts a merge field.

HTML Extended (Premium licenses)
Attribute Description
data-name The name of the corresponding mail merge field.
data-format This optional parameter allows the following possible values: Caps, FirstCap, Lower, Upper.
data-mappedField Set it to true if you want the merge field to be a mapped field.
data-preserveFormat If true (default value) preserves the original Word format.
data-textAfter Text to be included after the merge field.
data-textBefore Text to be included before the merge field.
data-verticalFormat If true (default value is false) uses a vertical format.

Other styles from phpdocx_text can also be used.

Code samples

Example #1

The resulting Word document looks like: