Auto Submit when page is loaded

I have a piece of Code that I use in many places that I got from “JavaScript & jQuery Examples”, it has worked perfectly for years and its still there:

/* Change the scene_1 to the scene key of your choice. */
$(document).on(‘knack-scene-render.scene_1’, function(event, scene) {
$(‘button[type=submit]’).submit();
});

Its stopped auto submitting on all of my apps and not being a coder I can’t track down why.

Can anybody help with this please.

Hi John, this code snippet should still work without any issues.

Would you mind submitting a ticket at support@knack.com so that we could see if we can find a reason why it doesn’t work anymore on your end?

This was my mistake, being a non coder something had got messed up elsewhere in the JavaScript code which was showing up here. I was able to sort it with a lot of trial and error and thanks to Marek.