I have a simple form that is being appended to a container:
<form action="/something" data-remote="true" method="post">
<input type="submit" />
</form>
My understanding was that rails_ujs.js
captures all submit events, so I wouldn't need to reattach any events when inserting new forms. However, this form is not being picked up as a remote form. Even when I put a debugger in rails_ujs.js
on the general submit event this form is not firing that event. All forms rendered server-side trigger it no problem.
Did I miss something about having to attach an event to dynamically inserted form?
It turns out I was rendering a form within a form and that was causing the issue. I'm an idiot :p
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With