How to pass values to form action

I have some ERB which has two lists
like this

I have JavaScript that enables one to push one object from one list to
the
other. So, now I want get all of the selected objects in the second list
in
my params array. How do I do that?

I am trying in the following lines

<%x=0 @string=survey+x params[:string]=%>
<%x++%>
Here I am creating a new string everytime and trying to populate the params array with the value in the list box. But its not working.

Any help is appreciated.

I ended up dealing with the same thing…

Insert a hidden variable in your form…
then that hidden variable will be inserted into
the params array when you hit submit…

I had
<Input type=“hidden” name"addedRight" value="">
in the rhtml…
the javascript populated the “addedRight” variable

then in the controller I pulled the values out with
b=params[:addedRight]

works great

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs