How to Auto-Populate a Word Form Field Using a Checkbox
Question details
The user wants to configure a Word document so that checking a specific checkbox automatically copies data from a source field (like billing information) into a target field (like shipping information).

- Product
- Word
- Device & OS
- not provided
- Scenario
- Building a dynamic form where user interaction with a checkbox toggles the visibility or duplication of text in another section.
- Observed behavior
- The target field requires proper IF and REF field codes referencing the exact bookmark names of both the source text and the checkbox control in order to function correctly.
Ensure the Developer tab is enabled in your Word ribbon, as you will need it to insert legacy form fields and access their properties.
Use a Legacy Check Box Form Field and IF Code
This method relies on Word's legacy form controls and standard field codes to evaluate the checkbox's state and dynamically display text.
To make this work, the checkbox and the source text field must both have unique Bookmark names defined in their properties. A conditional IF field code is then used to display the source text when the box is checked, or remain blank when unchecked.
Navigate to the Developer tab, click on the Legacy Tools icon in the Controls group, and select the Check Box Form Field to insert it into your document.
Right-click the inserted checkbox, select Properties, and type a name in the Bookmark field (e.g., CheckBox1). Do the same for the text field you want to copy from (e.g., BillName).
Place your cursor where you want the copied text to appear. Press Ctrl+F9 to insert field brackets. Inside them, type: IF { REF CheckBox1 } = "1" "{ REF BillName }" "". You must use Ctrl+F9 to create the nested brackets for the REF fields as well.
To ensure the field updates instantly when the user clicks the checkbox, go back to the Checkbox Properties and check the box for 'Calculate on exit'.
Select the newly created IF field code and press F9 to update it. It will now actively mirror the source text whenever the checkbox is checked.
Create Dynamic Forms Easily with WPS Office
WPS Writer offers full support for legacy form controls, bookmarks, and field codes, allowing you to build highly automated and interactive forms seamlessly.
- 1. Open Your Document: Launch WPS Writer and open the form document you wish to automate.
- 2. Access Form Controls: Navigate to the Insert or Developer tab to add checkboxes and text fields to your layout.
- 3. Apply Field Codes: Use standard Ctrl+F9 shortcuts to insert IF and REF field codes exactly as you would in other major word processors.

Frequently Asked Questions
Why does my field show the bookmark name instead of the desired text?
This usually happens if the REF field code is missing, or if you typed the curly braces manually. Ensure you use Ctrl+F9 to insert the nested brackets for { REF BillName } and add the mergeformat switch if necessary.
How do I make the field update automatically when the checkbox is clicked?
You need to open the Check Box Form Field Options (by right-clicking the checkbox and selecting Properties) and check the 'Calculate on exit' option. This forces Word to refresh document fields when the user interacts with the checkbox and clicks away.
Can I show different text when the box is unchecked instead of leaving it blank?
Yes. The syntax for the IF field is { IF { REF CheckBox1 } = "1" "Text if checked" "Text if unchecked" }. Simply replace the final empty quotation marks ("") with your desired text for the unchecked state.




