Check for duplicate entries before form is submitted