# Observer on checkbox

**URL:** <https://www.ruby-forum.com/t/observer-on-checkbox/113400>\
**Category:** Rails\
**Created:** [August 30, 2007, 6:54pm UTC](https://www.ruby-forum.com/t/observer-on-checkbox/113400 "2007-08-30T18:54:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f08c70/32.png) [@clive](https://www.ruby-forum.com/u/clive)\
**Post date:** [August 30, 2007, 6:54pm UTC](https://www.ruby-forum.com/t/observer-on-checkbox/113400/1 "2007-08-30T18:54:16Z")

</div>

Hi

I have attached an observer to a checkbox to determine if the box was  
checked and then to display an additional partial to get data from the  
user.

When then box is checked, the partial appears as required.

My query is this: I want to make the partial disappear if the check  
from the box has been removed, but I can’t see a way. Could anybody  
please enlighten me on how this might work.

I thought that a callback might be useful, but the :before callback,  
as far as I can see in Agile is only for the link\_to\_remote ajax call  
and hasn’t been implemented in observers.

Thanks in advance for any help.

Clive
