# Check\_box\_tag or check\_box which is fit for that?

**URL:** <https://www.ruby-forum.com/t/check-box-tag-or-check-box-which-is-fit-for-that/105259>\
**Category:** Rails\
**Created:** [May 28, 2007, 6:48am UTC](https://www.ruby-forum.com/t/check-box-tag-or-check-box-which-is-fit-for-that/105259 "2007-05-28T06:48:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ichikawa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/96bed5/32.png) [@ichikawa](https://www.ruby-forum.com/u/ichikawa)\
**Post date:** [May 28, 2007, 6:48am UTC](https://www.ruby-forum.com/t/check-box-tag-or-check-box-which-is-fit-for-that/105259/1 "2007-05-28T06:48:31Z")

</div>

hi,  
When I use  
\<% for count in @total\_cellno %\>  
\<%= check\_box\_tag(“checkbox”, value = count, checked = false) %\>  
\<% end %\>  
It produce the html  
  
.  
.  
.

And controller model  
@total \<\< params[:checkbox]

but the controller model holds one value from the chacked values.

using check\_box() I can not fullfill my condition as I can not changed  
the value of each check box.

So please help me to reach to my goal.

Amin

---

<div class="post-metadata">

**Author:** ![ichikawa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/96bed5/32.png) [@ichikawa](https://www.ruby-forum.com/u/ichikawa)\
**Post date:** [May 28, 2007, 10:37am UTC](https://www.ruby-forum.com/t/check-box-tag-or-check-box-which-is-fit-for-that/105259/2 "2007-05-28T10:37:45Z")

</div>

I believe if you make the name of the checkbox, “checkbox[]”, instead  
of “checkbox”, it will give you a list of the values that were  
checked.

Does that help?  
Josh

On May 27, 9:48 pm, Ichikawa A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
