Thanks for this.
I have tried both options and still have no action happening in my form.
I've first tried to change the code to replace my form name #button-code-test with body.
I then reverted back to the original JavaScript and tried changing the Location setting from Users to Posts and set the post type to page.
Neither of these worked. I also tried applying both changes and still no action is seen.
Is there any way to tell even if the code is being run? Being new to this I'm not sure how I can see what actions are being triggered and what code is being run from a debugging perspective.