# Show a radio button or checkbox as checked?

**URL:** <https://www.ruby-forum.com/t/show-a-radio-button-or-checkbox-as-checked/106891>\
**Category:** Rails\
**Created:** [June 15, 2007, 3:37am UTC](https://www.ruby-forum.com/t/show-a-radio-button-or-checkbox-as-checked/106891 "2007-06-15T03:37:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarah\_hutchinson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sarah\_hutchinson](https://www.ruby-forum.com/u/sarah_hutchinson)\
**Post date:** [June 15, 2007, 3:37am UTC](https://www.ruby-forum.com/t/show-a-radio-button-or-checkbox-as-checked/106891/1 "2007-06-15T03:37:11Z")

</div>

I have a bit of a newbie question here.

I have two radio buttons that are grouped (yes and no values). When I  
come to edit a record, how do I get the radio button to be checked?

I found a helper method on another site, but it doesn’t appear to be  
working. I can’t seem to get the checked state to show for either a  
radio button or checkbox?

Can someone help me out?

Thanks,  
Sarah

---

<div class="post-metadata">

**Author:** ![sarah\_hutchinson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sarah\_hutchinson](https://www.ruby-forum.com/u/sarah_hutchinson)\
**Post date:** [June 15, 2007, 5:23am UTC](https://www.ruby-forum.com/t/show-a-radio-button-or-checkbox-as-checked/106891/2 "2007-06-15T05:23:26Z")

</div>

Newbie error. Make sure your object is the right one.

Sorry for the useless post.

- Sarah
