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

onSubmit function for multiple typeform on one page #26

@pradeepgill007

Description

@pradeepgill007

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions