Ability to redirect to multiple thank you page based on form response

Hi there, I’ve been following this thread with great interest and attempting to implement this on a HS landing page. I can’t seem to get this working however so hoping someone could shed some light?
I’m using multi-dropdown select box in my form, so I’ve been trying to adjust the embed code from @anders_grove but I’m not 100% certain on how to do this.

I’m using a HTML module in the landing page to embed the modified code, is that correct? It’s just not appearing at all on my page so I’m obviously going wrong somewhere.

Then I’m trying to adjust the code as follows but again, not 100% sure if I’ve got it right - any help would be greatly appreciated:

<!--[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: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
		css: "",
		onFormSubmit: function($form) {
			var choice = $('select[name="catagory"]').val(); << Is this the name of the contact property field? >>
			if (choice == 'Dropdown Select Option 1') {
				window.location = 'https://example.com/landingpage1';
			} else if (choice == 'Dropdown Select Option 2'){
				window.location = 'https://example.com/landingpage1';
			} else if (choice == 'Dropdown Select Option 3'){
				window.location = 'https://example.com/landingpage2';
			} else if (choice == 'Dropdown Select Option 4'){
				window.location = 'https://example.com/landingpage3';
			} else if (choice == 'Dropdown Select Option 5'){
				window.location = 'https://example.com/landingpage4';
			}
		} 
	});
</script>

Looking forward to any suggestions/corrections :).

Thanks so much.

Peta