document.addEventListener("DOMContentLoaded",()=>{ const signupForm=document.getElementById("sign-form"); signupForm.addEventListener("submit",(event)=>{ event.preventDefault(); const userType=document.getElementById("user-type").value; const name=document.getElementById("name").value; const email=document.getElementById("email").value; const password=document.getElementById("password").value; if(!name|| !email|| !password){ alert("please fill in the field."); return; } signupForm.onsubmit(); }); });