How can i add custom script when a form is successfully submitted?

Copper Contributor

I am embedding a Microsoft Form on my website. I want to capture the event when the form submits successfully. Below is the embedded code and I want to run my custom JavaScript code on form submit.

 

<div>

    <iframe width="640px" height="480px" src="https://forms.office.com/Pages/ResponsePage.aspx? id=BiopSuv_ckSNqp3fkzLnW_NGlVhpUkdKjXPYvQce5XRUQzgwTExXOU0wMlFIT0hFWUpIS04zTlhRVi4u&embed=true" frameborder="0" marginwidth="0" marginheight="0" style="border: none; max-width:100%; max-height:100vh" allowfullscreen webkitallowfullscreen mozallowfullscreen msallowfullscreen> </iframe>

</div>

2 Replies

@mimranyaseen the normal way to do things is to use a flow in Power Automate. What is the script meant to do?

@RobElliottthanks for your reply. Actually, i want to call a method on my web page when the submit button submits successfully. I will use window.parent.postMessage to send message to webpage that hosting iframe.