Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

onSubmit function for multiple typeform on one page #26

Open
pradeepgill007 opened this issue Nov 13, 2018 · 5 comments
Open

onSubmit function for multiple typeform on one page #26

pradeepgill007 opened this issue Nov 13, 2018 · 5 comments

Comments

@pradeepgill007
Copy link

I am embedding 2 typeform in a single component. onSubmit function on both the component get called simultaneously even if I have submitted only first typeform.

import React from "react";
import { ReactTypeformEmbed } from "../components";

const ExampleWidget = () => {
  return (
    <div>
      <div>
        <ReactTypeformEmbed
          onSubmit={() => {
            console.log("typeform 1 submitted");
          }}
          url={"https://typeformdeviomedia.typeform.com/to/Cvc6N8"}
        />
      </div>
      <div>
        <ReactTypeformEmbed
          onSubmit={() => {
            console.log("typeform 2 submitted");
          }}
          url={"https://admin.typeform.com/to/cVa5IG"}
        />
      </div>
    </div>
  );
};

export default ExampleWidget;
@Ivaylo-Bachvarov
Copy link

Same Issue here.

@bekkblando
Copy link

Any update or workarounds on this issue?

@catob
Copy link

catob commented Jun 16, 2020

I had a similar issue with only one form on the page. Everything was fine on the first submit, but onSubmit was fired twice on the next form submit, and three times on the next and so on.

@InnProgress
Copy link

InnProgress commented Jul 19, 2020

I had a similar issue with only one form on the page. Everything was fine on the first submit, but onSubmit was fired twice on the next form submit, and three times on the next and so on.

Did you found workaround? Currently stuck with the same issue.

EDIT: Issue dissapeared by replacing this react wrapper with official @typeform/embeded package!

@catob
Copy link

catob commented Jul 20, 2020

I had a similar issue with only one form on the page. Everything was fine on the first submit, but onSubmit was fired twice on the next form submit, and three times on the next and so on.

Did you found workaround? Currently stuck with the same issue.

EDIT: Issue dissapeared by replacing this react wrapper with official @typeform/embeded package!

I did not. I ended up using the official typeform package as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants