Hi guys,
I have a group of check box in rails page.
check box Code as below:
<% for count in @total_cellno %>
<% end %>
I want to receive the selected value in my controller model.
@selected_box << params[“checkbox”]
I guess that it provides values in a array.
But @selected_box contains only one selected value.
How can i capture all checked value in a array?
Any idea?
Please help me…
Hi Marcel,
I use check_box_tag for check box ( according to ur hints)
<% for count in @total_cellno %>
<%= check_box_tag(“checkbox”, value = count, checked = false) %>
<% end %>
and in controller model I use following code to retrive the value in
Hash: @total = params[“checkbox”]
In @total only one value is stored.
Where is the problem? please take a hand. Thx in advanced.