How to add state dropdowns to membership forms in WordPress
The exact method depends on your membership plugin. Paid Memberships Pro can turn its state field into a US state dropdown with one filter, while country-dependent state lists need an addon or custom JavaScript. Test the form after changing countries and after payment.
- 01Identify the membership form
- 02Choose the dropdown behaviour
- 03Enable a US state dropdown manually
- 04Add country-dependent states
- 05Check saving and validation
- 06Use the faster PMPro route
What you need
- A WordPress membership plugin with an editable registration or checkout form
- Administrator access to WordPress
- A staging site or recent backup
- A child theme or code snippets tool if using the manual route
Identify the membership form
Find out which plugin generates the form and whether the state field is part of the billing address, a profile form, or a separate custom field. The instructions below use Paid Memberships Pro because its checkout form already includes country and state address fields.
If your form comes from another membership plugin, look for its own address-field or conditional-field settings. Do not add a second state field before checking, because two fields can save different values under different user-meta keys.
Choose the dropdown behaviour
Decide whether you need a fixed list of US states or a list that changes when the member selects a country. Paid Memberships Pro's built-in state-dropdown filter creates a US state select menu. It does not, by itself, create a complete country-dependent list for every country.
For international registration, you need a country-and-state addon, a form builder with dependent selects, or custom code that supplies and updates the regional data.
Enable a US state dropdown manually
For a Paid Memberships Pro checkout form that only needs US states, add this snippet through a child theme or a maintained code-snippets tool:
add_filter( 'pmpro_state_dropdowns', '__return_true' );
Paid Memberships Pro documents this filter as the switch that changes the state field into a select menu with US state abbreviations. The related state-list filters can be used when you need to change the available options.
Add country-dependent states
If the state options must change with the selected country, use a solution that adds both Country and State fields and updates the second field dynamically. The official Paid Memberships Pro country-and-state addon automatically adds both fields to the billing address section and changes the available states when the country changes. It has no separate settings screen after activation.
With another membership plugin, configure the country field first, then make the state field dependent on it. If the plugin cannot do this, custom JavaScript and server-side validation are required; changing the visible options in the browser alone is not enough.
Check saving and validation
Open the form while logged out and test a new registration. Select the country, confirm that the state list changes, submit an invalid or blank value, and check the saved member profile after checkout. Also test a free membership if your site offers one, because free and paid registrations may use different processing paths.
Common failures include a state field that still accepts arbitrary text, a required state field that disappears for countries without predefined regions, and custom values that appear on-screen but are not saved to the member profile. Check the browser console and the membership plugin's validation errors before going live.
Use the faster PMPro route
If Paid Memberships Pro runs your membership forms and you need country-dependent state selectors, the Paid Memberships Pro - State Dropdowns Addon is the quickest route. Activate it from the Paid Memberships Pro add-ons area or upload the addon ZIP through Plugins > Add New > Upload Plugin, then activate it and test the checkout form. The addon is designed to add Country and State dropdowns without writing the dependent-field code yourself.
Use the manual filter instead when you only need US states and want to keep the form simple. Choose the addon when streamlined global registration is the goal.
Let Paid Memberships Pro - State Dropdowns Addon do it
Adds country-dependent state dropdowns to Paid Memberships Pro forms; choose it when streamlined global registration is the goal.
Sources
- paidmembershipspro.com /hooks-filters/?utm_source=openai
- paidmembershipspro.com /add-ons/state-dropdown/?utm_source=openai
- paidmembershipspro.com /documentation/user-fields/field-types-attributes/?utm_sourc…
Questions
- Can I add a US state dropdown without another plugin?
- Yes. Paid Memberships Pro can turn its existing state field into a US state dropdown with the <code>pmpro_state_dropdowns</code> filter. Add the filter through a child theme or code-snippets tool, then test the checkout and saved profile. This manual method is suitable for US-only forms, but it does not provide a full country-dependent state database.
- Can the state list change when a member selects a country?
- Yes, but the form needs dependent-field logic. A country-and-state solution loads the appropriate regional options after the country changes. Paid Memberships Pro's official addon adds both dropdowns and updates the state choices automatically. With another membership plugin, use its conditional fields feature or add both client-side updates and server-side validation yourself.
- Why is my state dropdown still showing as a text box?
- The most common reason is that the code was added to the wrong site, was placed in a parent theme that was later overwritten, or the form is not generated by Paid Memberships Pro. The built-in filter applies to PMPro's checkout state field, not every form on WordPress. Confirm the form source, clear caches, and inspect the page for JavaScript or PHP errors.
- Will a custom state field save to the member profile?
- It can, but only if the field is registered and processed by the membership plugin. A visually added HTML select may display correctly while its value is discarded during checkout. Use the plugin's supported user-field system where possible, and test both the checkout submission and the member profile after payment. Paid Memberships Pro documents custom user fields as part of its checkout and profile workflow.