secondo me l'errore sta nella funzione subPreSubmit() che non hai postato.