I have an existing form field like this:
<input id="register-city" type="text" name="city" class="input-block " aria-describedby="register-city-desc" aria-required="true" required="" value="">
I want to change the field to select option without changing the HTML code.
How can I accomplish this with JavaScript by injecting the register-city
id?
So when the user opens the page, the input field will change to option like:
<option>US</option>
<option>UK</option>