With Rails UJS, how to submit a remote form from a function

前端 未结 3 1124
执笔经年
执笔经年 2021-02-05 10:44

I\'m using Rails UJS. I have a form setup to do a remote submit like so:

3条回答
  •  暖寄归人
    2021-02-05 11:06

    Try to trigger the submit.rails event:

    $("#new_subscription").trigger("submit.rails");
    

提交回复
热议问题