Data duplicated when try to submit data to google form

Hi
I designed a website to collect user’s input and submit to a google form by corvid and i-frame.
But somehow some data will duplicate or re-submit to google form, and that is a problem to me. I attached part of my code as follow, hope someone can help.


There’s a first page to collecting user’s input. When user click submit button, data will be keep in session by wix-storage api and jump to a thanks page.
code like this:
var param = encodeURIComponent(“some-string-data”);
local.setItem(“url”, “google-form-url”);
local.setItem(“param”, param);
wixLocation.to(“/thanks”);
In thanks page, there’s a button for user to double check whether to submit. After user click the button, data will be post to i-frame. Then i-frame will submit data to google form and show thanks message of google form.
thanks page code like this:
export function submit_button_click(event) {
$w(“#iframe”).postMessage(local.getItem(“url”)+“|”+local.getItem(“param”));
local.removeItem(“url”);
local.removeItem(“param”);
}
i-frame java script like this:

Are you connecting your Google Form like this.
https://www.youtube.com/watch?v=1W3YMHDm8W8
https://www.youtube.com/watch?v=_ciCLObJS2A

As it is being submitted twice into Google, then you are best contacting Google Forms own support pages to get help for this as you may need to possibly change your provided html code so that it checks for duplicates for example.
https://support.google.com/a/users/answer/9282666?hl=en
https://support.google.com/docs/topic/9055404?hl=en&ref_topic=1382883

Meanwhile, have a read of this.
https://stackoverflow.com/questions/55188211/google-app-script-triggering-twice-after-google-form-submit

Finally, have a read of Wix guidelines/limitations with html.
https://support.wix.com/en/article/guidelines-and-limitations-of-the-html-code-and-embed-a-site-elements