Display dropdown options based on previous field selection

Job ID: 32116421

Budget: $10 – $30 USD

I have a WPform and a custom product field, that ask for State and then City.

State is a dropdown select field and City is just text.
Instead of that, I want that city field be a dropdown with options shown conditionally based on previus state selection. I have an array with states=>Cities