I am using WPcode to add a javascript snippet to a page. But I’m not able to get the gform_form_saving_action_save_begin to fire. I am looking for suggestion or hints as to why. Code below:
Thanks you for the help. Unfortunately that did not work. Jquery wasn’t loaded when the script ran, so I tried using a DOMcontentLoaded listener. But neither worked. Here is my latest attempt (This doesn’t work either) This should attach the ‘save_completed’ event listener after the DOM is loaded and the form rendered.
It appears that there is not a method to capture the submit event on the front end. The ‘save_completed’ is for when the form is created and saved. It is not for when the form is in use.
I will have to capture the submit on the backend using PHP.