added front end validation for creating a survey