Form-field mail merge
Prepare a patient form
Compare an editable, pre-populated form with a flattened record generated from the same template and JSON.
- 1
Select the output behavior
Keep fields interactive for completion, or replace them with permanent content.
- 2
Export the prepared result
After reviewing the loaded result, download it as an Adobe PDF.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Choose how merged values affect form fields
Mail merge can target form fields without requiring separate field-by-field manipulation. The merge mode determines whether recipients can still edit the result.
Preselect keeps the controls and sets their current values. Replace removes the controls and writes ordinary document content in their place.
API used
MailMerge.FormFieldMergeType
How it works
The controller loads the patient-history template and the colocated JSON data. FormFieldMergeType.Preselect preserves fields; FormFieldMergeType.Replace flattens the merged values before the result is loaded.