How to Create Conditional Text Based on a Word Dropdown Selection
Question details
The user needs to display specific text in a document depending on the option selected from a dropdown menu.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Creating a dynamic form or template where subsequent text strings automatically adapt to a prior dropdown selection such as Apple, Orange, or Banana.
- Observed behavior
- Different text responses need to populate dynamically when a user makes a selection from a dropdown list, rather than remaining static.
Ensure the Developer tab is enabled in your Word ribbon, as you will need access to Legacy Form tools or Content Controls to set up the dropdown menu and bookmarks.
Use an IF...THEN...ELSE Field Construction
This method uses native Word fields to evaluate a dropdown bookmark and display the corresponding text without requiring macros.
By combining a Legacy Dropdown Form Field with an IF field, Word can evaluate the current selection and output dynamic text. This is highly compatible and does not trigger macro security warnings.
Go to the Developer tab, click on Legacy Tools, and insert a Dropdown Form Field. Double-click the field to add your items (e.g., Apple, Orange, Banana).
In the Dropdown Form Field Options, name the Bookmark 'Fruit' and check the 'Calculate on exit' box. Click OK.
Place your cursor where the conditional text should appear. Press Ctrl+F9 to insert field brackets. Type: IF REF Fruit = "Apple" "You chose an Apple." "" inside the brackets.
To support all choices, nest the fields. For example: { IF { REF Fruit } = "Apple" "Apple text" { IF { REF Fruit } = "Orange" "Orange text" "Banana text" } }.
Update the field by pressing F9. Then, restrict editing to 'Filling in forms' to test the automatic text update when changing the dropdown.

Use a VBA Document_ContentControlOnExit Event
Ideal for more advanced scenarios, this VBA method updates a response field automatically when a user exits the dropdown content control.
Easily Create Interactive Documents with WPS Office
WPS Office Writer offers robust native support for form fields, content controls, and field codes, making it simple to build smart templates with conditional text while maintaining full compatibility with Microsoft Word formats.
- 1. Open WPS Writer: Launch WPS Office and open a new document or existing template.
- 2. Access the Developer Tab: Ensure the Developer tab is enabled in your ribbon to access the full suite of form controls.
- 3. Insert Form Fields: Use the Dropdown Form Field tool to insert your list and define choices like Apple or Orange.
- 4. Apply Logic Fields: Insert standard IF fields using Ctrl+F9 to reference your dropdown bookmark and automate your document text.

Frequently Asked Questions
Why isn't my conditional text updating after I change the dropdown selection?
If you are using Legacy Form Fields with IF fields, you must ensure 'Calculate on exit' is checked in the dropdown properties. Without this, the document does not know it needs to refresh the related fields when you change the selection.
Can I have an editable text box appear only when 'Banana' is selected?
Yes, but this requires VBA. By using the ContentControlOnExit event, you can program the macro to insert a text box or unhide a section of the document only when the specific value 'Banana' is selected.
Does WPS Office support Word's VBA macros for dropdowns?
Yes, WPS Office provides excellent support for VBA macros in its professional versions. For users needing free solutions, the IF...THEN...ELSE field method works perfectly in the standard free version of WPS Office.




