# Link\_to\_remote :with =\> multiple items

**URL:** <https://www.ruby-forum.com/t/link-to-remote-with-multiple-items/144033>\
**Category:** Rails\
**Created:** [July 24, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-multiple-items/144033 "2008-07-24T20:18:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 24, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-multiple-items/144033/1 "2008-07-24T20:18:50Z")

</div>

Hi,

How do I pass multiple params?

:with =\> “‘p1=’ + ‘blah’”  
I also want to pass ‘p2=’ + ‘blah’, etc…

thanks

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 24, 2008, 8:41pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-multiple-items/144033/2 "2008-07-24T20:41:12Z")

</div>

You can use a standard URL query string. Separate the parameters with  
an ampersand

See:  
[http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html#M001625](http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html#M001625)

On Thu, Jul 24, 2008 at 1:18 PM, Justin To

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 24, 2008, 8:44pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-multiple-items/144033/3 "2008-07-24T20:44:45Z")

</div>

Have a look at the docs & see if you can use :submit instead of :with.  
That lets you, e.g., submit everything in a particular

, all  
packaged up in params–very easy…

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 24, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-multiple-items/144033/4 "2008-07-24T21:04:59Z")

</div>

Thanks Christopher, that’s what I was looking for.

Another related question:

Requirement Title:\<%= form.text\_field :title, :value =\> params[:title],  
:name=\>“title” %\>  
\<%= link\_to\_remote “Check”, :url =\> { :action =\>  
:check\_req\_title }, :with=\>"‘title\_search=’ + $(‘title’).value" %\>

Does that pass params[:title\_search] = the value of the text\_field?

Thanks!

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 25, 2008, 4:06am UTC](https://www.ruby-forum.com/t/link-to-remote-with-multiple-items/144033/5 "2008-07-25T04:06:37Z")

</div>

On Thu, Jul 24, 2008 at 2:04 PM, Justin To  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Does that pass params[:title\_search] = the value of the text\_field?  
> Provided that the id of the text field is title it should. The  
> development log will show you what is in the params object.
