You can show any checkout field only when another field is filled with a specific value.
To achieve that, please go to the checkout customizer: Products > Settings > Shopping Cart and click the edit checkout fields button. The checkout customizer will open up.
Each checkout field has a rules section at the bottom of the edit box.
The first field is a drop-down with all available fields in the checkout. The second field is where you should set a value of the selected field. After that, the field will show up only when the user fills the selected field with the value specified in the rule.
Usage Example: we want to show the State drop-down only when the user selects the USA as a country. The steps:
- Click on the State field to open the edit box
- In the rules section, select the Country with the value United States
After that, the State field will show up only when the user selects the United States as a country.