I have a JavaScript script which is meant to hide a submit button on a form. It works when I look at the form preview. This form only appears as a user task in the forms process, and in this it doesn't work. As a test, I added an alert to the JS and that follows through, and the JS is in the page source so I know it's there. That prompted me to do some more testing to alter my script, since the element might be mutated. This is where it gets weird.
I'm in the dev console and I see the element is an input element, with a Submit class. So in jQuery I try to target $('input.Submit') and it can't find it. I tried a dozen different things and none of them could find the element. In vanilla JavaScript I tried document.querySelector('input.Submit'), I tried document.getElementsByClassName('.Submit'), etc. and nothing could find it.
Even when I just did $('input') it returned a jQuery object with 9 elements, but not the input.Submit object. We tried to select its parent wrapper with both jQuery and JavaScript and couldn't target it. We desperately tried to target just a .form-q and were not able to.
What's going on?