Add a Confirmation Alert to a Marketo Form

December 17, 2014 | by

Let’s say when a user click the “Send” button on a Marketo form, you would like to display a notification that asks the user if “Is it really ok to send”?. This possible by implementing a few lines of JavaScript, which will show a confirmation box when somebody clicks the Send button.

Screen Shot 2014-12-17 at 11.48.05 AM
Here’s an example of how to do this. Add the onSubmit function to your Marketo form as shown below. For more information about Marketo Forms API, please check out the developer documentation.