# Best techniques for ajax-submitting multiple forms at once requested

**URL:** <https://www.ruby-forum.com/t/best-techniques-for-ajax-submitting-multiple-forms-at-once-requested/190258>\
**Category:** Rails\
**Created:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/best-techniques-for-ajax-submitting-multiple-forms-at-once-requested/190258 "2010-06-17T16:22:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lille](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@Lille](https://www.ruby-forum.com/u/Lille)\
**Post date:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/best-techniques-for-ajax-submitting-multiple-forms-at-once-requested/190258/1 "2010-06-17T16:22:31Z")

</div>

Hi,

I have multiple forms on a page that can be sent individually via  
submit\_to\_remote. I’d also like to offer the option of sending the  
data from my several forms at once. Based on google searches related  
to this, it seems the best approach will be to javascript something  
that sends each the data form each form one after the other –  
multiple ajax calls.

But isn’t there a technique for merging the data from the individual  
forms and ajax submitting it all at once?

thanks,

Lille

---

<div class="post-metadata">

**Author:** ![Lille](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@Lille](https://www.ruby-forum.com/u/Lille)\
**Post date:** [June 17, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/best-techniques-for-ajax-submitting-multiple-forms-at-once-requested/190258/2 "2010-06-17T16:26:22Z")

</div>

Hi Lille,

On Tue, Jun 15, 2010 at 10:11 AM, Lille [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> But isn’t there a technique for merging the data from the individual  
> forms and ajax submitting it all at once?

Never tried this particular scenerio, but the link\_to\_remote method  
takes a :submit argument that will serialize and post all the inputs  
inside the div specified as its argument. You might give that a try.

HTH,  
Bill

---

<div class="post-metadata">

**Author:** ![Lille](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@Lille](https://www.ruby-forum.com/u/Lille)\
**Post date:** [June 17, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/best-techniques-for-ajax-submitting-multiple-forms-at-once-requested/190258/3 "2010-06-17T16:27:01Z")

</div>

Bill,

Yes, thanks, that indeed does the trick!

Best,

Lille
