contact form front end logic