DS Server

Javascript: TXTextControl.showMergeFieldDialog Method

Method|Introduced in 25.0

Description

Opens a field dialog either for changing properties of an existing merge field or for creating a new merge field. If the fieldType parameter is omitted, the field dialog for the merge field at the current input position is shown (if there is one). Setting the fieldType parameter to a valid value creates a new field or replaces the field at the current position.

Syntax

<void> TXTextControl.showMergeFieldDialog(<FieldType> fieldType)

Parameters

ParameterDescription
fieldType

The field dialog type to show.

Examples

The following example demonstrates TXTextControl.showMergeFieldDialog in a practical document-editing workflow. It opens a field dialog either for changing properties of an existing merge field or for creating a new merge field. If the fieldType parameter is omitted, the field dialog for the merge field at the current input position is shown (if there is one). Setting the fieldType parameter to a valid value creates a new field or replaces the field at the current position.

TXTextControl.showMergeFieldDialog(TXTextControl.FieldType.MergeField);