aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-01-19 14:27:24 +0200
committerGravatar ks129 <[email protected]>2021-01-19 14:27:24 +0200
commit4cf4ae1a0195f0e0923ee48b428b94447e8f64b0 (patch)
tree4bdfa0de17b3800d82eecaf2801ecd2ec1715c23 /src/pages
parentImplement before-submit validation (broken, crashing) (diff)
Add preventDefault to avoid reloading of page
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/FormPage.tsx1
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) => {