I tried to combine these 3 functions into one, but after I did that, it won`t work. can you help me combine those?
function showForm(id, name) {
Try This :
function showForm (id, name) {
document.getElementById('submitForm').style.display = "block";
if (id == 0)
document.getElementById('submitForm').style.display = "none";
else
document.getElementById(i).style.display = 'block';
}
JavaScript statements can be grouped together in code blocks, inside curly brackets {...}.