# How to have a "select all" checkbox?

**URL:** <https://www.ruby-forum.com/t/how-to-have-a-select-all-checkbox/81377>\
**Category:** Rails\
**Created:** [January 8, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/how-to-have-a-select-all-checkbox/81377 "2007-01-08T17:15:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [January 8, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/how-to-have-a-select-all-checkbox/81377/1 "2007-01-08T17:15:10Z")

</div>

lo there  
i have a form with a list of checkboxes ( one for each item that a  
customer has )  
in rails, how would i add a “select all” checkbox for this form ?  
i can’t seem to find anything about it.

shawn

---

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [January 8, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/how-to-have-a-select-all-checkbox/81377/2 "2007-01-08T17:20:12Z")

</div>

Hi, I think you have write a javascript function for this

nephish wrote:

> lo there  
> i have a form with a list of checkboxes ( one for each item that a  
> customer has )  
> in rails, how would i add a “select all” checkbox for this form ?  
> i can’t seem to find anything about it.
> 
> shawn

---

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [January 8, 2007, 5:28pm UTC](https://www.ruby-forum.com/t/how-to-have-a-select-all-checkbox/81377/3 "2007-01-08T17:28:17Z")

</div>

thanks, will do.  
shawn
