js validation for duplicate questionnaire