开发者

Rails remote form loaded via Ajax after document ready is not submitting

开发者 https://www.devze.com 2023-04-08 20:44 出处:网络
I have a remote form using form_tag and :remote => true that is loaded from a partial. When I load the form through its own view as normal, it works as intended. However, then I try loading the par

I have a remote form using form_tag and :remote => true that is loaded from a partial. When I load the form through its own view as normal, it works as intended. However, then I try loading the partial on another page through AJAX after document ready. When I try to submit this form, nothing happens. I've tried a regular submit button and calling form.s开发者_StackOverflowubmit().

Is there some javascript initialization to remote forms that Rails does that I have to duplicate? Or is there something else going on here?


The only thing that I can think of off the top of my head is the CSRF token left out of the form.

0

精彩评论

暂无评论...
验证码 换一张
取 消