<select name="model1" id="model" class="form-control" onchange="document.getElementById('model_text').value=this.options[this.selectedIndex].text,getType()"> <option>Select car model</option> <!-- js populates --> <input type="hidden" id="model_text" name="model" /> </select>