diff options
| author | 2021-01-19 14:27:24 +0200 | |
|---|---|---|
| committer | 2021-01-19 14:27:24 +0200 | |
| commit | 4cf4ae1a0195f0e0923ee48b428b94447e8f64b0 (patch) | |
| tree | 4bdfa0de17b3800d82eecaf2801ecd2ec1715c23 /src/pages | |
| parent | Implement before-submit validation (broken, crashing) (diff) | |
Add preventDefault to avoid reloading of page
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/FormPage.tsx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx index 6c7cad2..1a9b7cf 100644 --- a/src/pages/FormPage.tsx +++ b/src/pages/FormPage.tsx @@ -174,6 +174,7 @@ function FormPage(): JSX.Element { }); function handleSubmit(event: SyntheticEvent) { + event.preventDefault(); // Client-side required validation const invalidFieldIds: string[] = []; questionsMap.forEach((prop, id) => { |