diff --git a/src/components/FormView.jsx b/src/components/FormView.jsx index c8b8b3e..3aba042 100644 --- a/src/components/FormView.jsx +++ b/src/components/FormView.jsx @@ -78,6 +78,11 @@ const FormView = ({ return text; }; + const submit = (e) => { + resetFormOnError(); + onSubmit(e); + }; + return (
@@ -86,17 +91,7 @@ const FormView = ({ {data.description && (

{data.description}

)} - {formState.error ? ( - - - {intl.formatMessage(messages.error)} - -

{formState.error}

- -
- ) : formState.result ? ( + {formState.result ? ( {/* Custom message */} {data.send_message ? ( @@ -123,7 +118,7 @@ const FormView = ({
@@ -203,6 +198,15 @@ const FormView = ({

{intl.formatMessage(messages.empty_values)}

)} + + {formState.error && ( + + + {intl.formatMessage(messages.error)} + +

{formState.error}

+
+ )} {data?.show_cancel && (