Embedded Form submission & redirect URL based on form parameters

Hi @IsaacTakushi , I am having some trouble getting this to work properly. It is not clear to me where

var website = $form.find('input[name="email"]').val();

is supposed to go. Here is what I have.

<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
 hbspt.forms.create({
	portalId: "xxxxxx",
	formId: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx"
	 inlineMessage: 'This page is redirecting.',
 onFormSubmit: function($form){
 setTimeout( function() {
 var website = $form.find('input[name="email"]').val();
 window.location = "http://app.domain.com?" + formData;
 }, 250 ); // Redirects to url with query string data from form fields after 250 milliseconds.
 }
});
</script>

This simply shows the message, and doesn’t do anything to redirect to another page.

I am pretty sure I have put the “Var website…” in the wrong location, I just don’t know where it needs to go.

Thank you!