Hello! I noticed that all the codes im putting in to effect forms in a module wont be read. I have got feedback on this earlier, that I need to use onLoad. I have used the exact same code as recommended, but still it wont be read. I have been trying to use onLoad with no luck. But my code works perfectly in console if i drop the whole code in there. The code works, but jquery wont get read from module
If so, I mentioned that you should use the onFormReady function for the embed code. Since you're rendering our forms using HubL, there's no way to input that callback function. I'd recommend using something other than document.ready such as window.load since the window.load event fires after document.ready. Otherwise, you'll need to create a custom function that listens for the form to load first before firing your code.
I edited your function to use the window.load event, and it appears that the code is now working