question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onSubmit prop in React Widget not firing

See original GitHub issue

I’ve been using the Widget component from @typeform/embed-react for months now with no issues, however as of this morning the onSubmit handler has stopped firing. To test, I replaced the body of my onSubmit handler with just a console.log and am not seeing even that.

My implementation looks like:

[...]

const handleSubmit = (response) => {
   console.log('submitted');
};

[...]

return (
   <Widget
        id="<id here>" // edited out, but can provide this id if necessary
        style={{ width: "100%", height: "100%", zIndex: 10 }}
        onSubmit={handleSubmit}
   />
);

The Results tab in the Typeform admin shows that my responses are in fact being submitted.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

7reactions
mathiocommented, Feb 4, 2022

We identified the issue and prepared a fix. It should be deployed and available shortly. I will update you here and close the issue when it is.

7reactions
mathiocommented, Feb 4, 2022

Hello all, thank you for reporting this. We are aware about this bug and will look into it right away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react is not firing form onSubmit function - Stack Overflow
The problem lies with <Button> from Material-ui not being an actual button but rather a combination of a <span> .
Read more >
Can clicking the custom "I want to submit" button not trigger ...
Ideally, I'm providing a sample JSFiddle or a shared playground link demonstrating the issue. Description. Can clicking the custom "I want to ...
Read more >
Submit Validation Example - Redux Form
Pass it as an onSubmit prop to your decorated component. ... inside your decorated component to cause it to fire when the submit...
Read more >
React Stripe.js reference | Stripe Documentation
The easiest way to initialize a Stripe object is with the Stripe.js wrapper module. After this prop has been set, it can not...
Read more >
Home - react-jsonschema-form documentation - Read the Docs
Note: The CDN version does not embed react or react-dom . ... You can pass a function as the onSubmit prop of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found