title: Subscribe to form submit event from input
body: <p>I'd want to be able to use jQuery's <code>.on(event, function)</code> function to listen to form submission. For example, something like:</p>
  <pre><code>$(&quot;myInput&quot;).on(&quot;formSubmitted&quot;, functionToBeExecuted);
  </code></pre>
  <p>Seems pretty simple but yet I can't think of a solution (newbie backend dev here). Any ideas?</p>
  <hr />
  <p>UPDATE:</p>
  <p>Hmm seems like something else is going on with my code, <code>myInput.on('submit', functionToBeExecuted)</code> is not working for me and I don't see any errors in the console. There is nothing special but here's my code:</p>
  <pre><code>for (var i = 0; i &lt; containers.length; i++) {
      var input = $(containers[i]).find('[data-sf-role=&quot;text-field-input&quot;]');
  
      if (input) {
          input.on('change', functionToBeExecuted);
          input.on('input', functionToBeExecuted);
          input.on('submit', functionToBeExecuted);
      }
  }
  </code></pre>
  <p>The <code>change</code> and <code>input</code> event is working, only <code>submit</code> is not.</p>