You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I submit a form in Rails 7 the respond_to format is always html and my turbo_stream.replace never runs.
It works if I make my own callback and change form.submit() to form.requestSubmit(). I'm unsure if all browsers support requestSubmit though. hotwired/turbo#775
<<-HTML<script>varinvisibleRecaptchaSubmitForm=function(){varclosestForm=function(ele){varcurEle=ele.parentNode;while(curEle.nodeName!=='FORM'&&curEle.nodeName!=='BODY'){curEle=curEle.parentNode;}returncurEle.nodeName==='FORM' ? curEle : null};varel=document.querySelector(".g-recaptcha")if(!!el){varform=closestForm(el);if(form){form.requestSubmit();}}};</script>
HTML
The text was updated successfully, but these errors were encountered:
When I submit a form in Rails 7 the respond_to format is always html and my turbo_stream.replace never runs.
It works if I make my own callback and change form.submit() to form.requestSubmit(). I'm unsure if all browsers support requestSubmit though. hotwired/turbo#775
The text was updated successfully, but these errors were encountered: