# Submitting aform using link\_to\_remote

**URL:** <https://www.ruby-forum.com/t/submitting-aform-using-link-to-remote/88536>\
**Category:** Rails\
**Created:** [March 12, 2007, 12:33pm UTC](https://www.ruby-forum.com/t/submitting-aform-using-link-to-remote/88536 "2007-03-12T12:33:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@senthil](https://www.ruby-forum.com/u/senthil)\
**Post date:** [March 12, 2007, 12:33pm UTC](https://www.ruby-forum.com/t/submitting-aform-using-link-to-remote/88536/1 "2007-03-12T12:33:10Z")

</div>

Hi all,  
I want ro submit form using link\_to\_remote , since i wnat to  
pass all form parameters to back end i dont want to use send each value  
in :with option.how to submit a form using link\_ro\_remote.  
Can anyone help me out

with regards,  
senthil

---

<div class="post-metadata">

**Author:** ![senthil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@senthil](https://www.ruby-forum.com/u/senthil)\
**Post date:** [March 12, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/submitting-aform-using-link-to-remote/88536/2 "2007-03-12T14:57:46Z")

</div>

senthil wrote:

> Hi all,  
> I want ro submit form using link\_to\_remote , since i wnat to  
> pass all form parameters to back end i dont want to use send each value  
> in :with option.how to submit a form using link\_ro\_remote.  
> Can anyone help me out
> 
> with regards,  
> senthil

In the case of link\_to\_remote, you have to pass each paramter back. A  
better idea would be to use form\_remote\_tag which sends back all the  
form parameters.

thanks,  
Bins.

---

<div class="post-metadata">

**Author:** ![senthil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@senthil](https://www.ruby-forum.com/u/senthil)\
**Post date:** [March 12, 2007, 3:25pm UTC](https://www.ruby-forum.com/t/submitting-aform-using-link-to-remote/88536/3 "2007-03-12T15:25:17Z")

</div>

bins wrote:

> senthil wrote:
> 
> > Hi all,  
> > I want ro submit form using link\_to\_remote , since i wnat to  
> > pass all form parameters to back end i dont want to use send each value  
> > in :with option.how to submit a form using link\_ro\_remote.  
> > Can anyone help me out
> > 
> > with regards,  
> > senthil
> 
> In the case of link\_to\_remote, you have to pass each paramter back. A  
> better idea would be to use form\_remote\_tag which sends back all the  
> form parameters.
> 
> thanks,  
> Bins.

Thanks bins,  
But i am already using form\_remote\_tag, i dont want to use  
submit\_to\_remote.I want to use link\_to\_remote to submit the whole form  
.how to do this

thanks & regards,  
senthil

---

<div class="post-metadata">

**Author:** ![senthil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@senthil](https://www.ruby-forum.com/u/senthil)\
**Post date:** [March 12, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/submitting-aform-using-link-to-remote/88536/4 "2007-03-12T16:31:57Z")

</div>

> ```
> But i am already using form_remote_tag, i dont want to use 
> 
> ```
> 
> submit\_to\_remote.I want to use link\_to\_remote to submit the whole form  
> .how to do this

actually there is a trick in the middle of both worlds… you declare  
your form with a form\_remote\_tag, then you make a link\_to\_function to  
fire the onsubmit of the form. That way you are getting all the  
arguments of the form serialized without doing it yourself.

regards,

javier ramirez

## –

Estamos de estreno… si necesitas llevar el control de tus gastos  
visita [http://www.gastosgem.com](http://www.gastosgem.com) !!Es gratis!!

---

<div class="post-metadata">

**Author:** ![senthil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@senthil](https://www.ruby-forum.com/u/senthil)\
**Post date:** [March 12, 2007, 4:57pm UTC](https://www.ruby-forum.com/t/submitting-aform-using-link-to-remote/88536/5 "2007-03-12T16:57:01Z")

</div>

You can :submit option of link\_to\_remote.

If you want to submit a table called my\_table contains fields just use  
this

\<%= link\_to\_remote( “\<input type=button value=Submit style=‘font-size:  
1.0em;’”,  
:submit =\> “my\_table”,  
:url =\> {:controller =\>  
“controller”, :action =\> “action”} ) %\>

wtih this inputs in the table are serialized and posted as form.
