Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error from submitForm() - ReferenceError: form is not definedΒ #63

@audreyfeldroy

Description

@audreyfeldroy

πŸ› Bug report

Current Behavior

In the Next.js example project when you submit even the simplest form possible:

  1. You get the error "Warning: An unhandled error was caught from submitForm() ReferenceError: form is not defined"
  2. The form remains unsubmitted, like this:

 2021-06-10 at 10 28 37

I also tried deploying the project to Vercel and saw the same exact behavior. This is with the example project as-is, no code changes.

Expected behavior

According to pages/forms/[slug].js the page should show:

Thank you! Your response has been recorded.

Reproducible example

  1. Create a Formium form called Contact Us with slug contact-us and a single Long Answer field
  2. Run the Next.js example project
  3. Visit http://localhost:3000/forms/contact-us
  4. Enter text and click Submit

The error message shown upon clicking Submit is:

[slug]-eaffa2def08376dc39cc.js:1 Warning: An unhandled error was caught from submitForm() ReferenceError: form is not defined
at [slug]-eaffa2def08376dc39cc.js:1
at s (84c07eab6f228c48b428ae9d46fff81a486def3e.622d629406396a02285e.js:1)
at Generator._invoke (84c07eab6f228c48b428ae9d46fff81a486def3e.622d629406396a02285e.js:1)
at Generator.next (84c07eab6f228c48b428ae9d46fff81a486def3e.622d629406396a02285e.js:1)
at o ([slug]-eaffa2def08376dc39cc.js:1)
at u ([slug]-eaffa2def08376dc39cc.js:1)
at [slug]-eaffa2def08376dc39cc.js:1
at new Promise ()
at [slug]-eaffa2def08376dc39cc.js:1
at [slug]-eaffa2def08376dc39cc.js:1

Suggested solution(s)

Additional context

Your environment

Software Version(s)
Formium 0.1.3
React 17.0.2
TypeScript n/a
Browser Google Chrome Version 91.0.4472.77 (Official Build) (x86_64)
npm/Yarn npm 6.14.13
Operating System macOS Big Sur 11.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions