Please leave this field empty.
// Hide the favorite-color text field by default document.getElementById("custom_text").style.display = 'none'; document.getElementById("custom_district").style.display = 'none'; // On every 'Change' of the drop down with the ID "FavoriteColorDropDown" call the displayTextField function document.getElementById("custom_state").addEventListener("change", displayTextField); function displayTextField() { // Get the value of the selected drop down var dropDownText = document.getElementById("custom_state").value; // If selected text matches 'Other', display the text field. if (dropDownText == "Telangana") { document.getElementById("custom_district").style.display = 'block'; } else { document.getElementById("custom_district").style.display = 'none'; } if (dropDownText == "Others") { document.getElementById("custom_text").style.display = 'block'; } else { document.getElementById("custom_text").style.display = 'none'; } }
President