Showing results for 
Search instead for 
Did you mean: 

change textfield to dropdown

change textfield to dropdown


Any idea how to change the input type from textfield (city) to dropdown on the checkout page?




Re: change textfield to dropdown


The easiest would be to add a new entity where the values for your cities are stored. In the frontend, just change the input type to dropdown and load the list of cities.


When a user selects a field from the dropdown, store the text value (as it is now). You could even do a check if the selected city is a valid one from your city list before storing the data. This way you don't have to change a lot.


Hope it helps!