# Hiding form when clicking outside field

**URL:** <https://www.ruby-forum.com/t/hiding-form-when-clicking-outside-field/161105>\
**Category:** Rails\
**Created:** [February 23, 2009, 1:38pm UTC](https://www.ruby-forum.com/t/hiding-form-when-clicking-outside-field/161105 "2009-02-23T13:38:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [February 23, 2009, 1:38pm UTC](https://www.ruby-forum.com/t/hiding-form-when-clicking-outside-field/161105/1 "2009-02-23T13:38:29Z")

</div>

im guessing this is somethign to do with prototype but i want a form  
which comprises of one field to disapear if the user clicks anywhere  
outside of that field. Ive seen this doen on [rememberthemilk.com](http://rememberthemilk.com) but not  
sure how its done in rails.

if anyone could point me in the right direction id appreciate it.

---

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [February 24, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/hiding-form-when-clicking-outside-field/161105/2 "2009-02-24T16:42:55Z")

</div>

Hi Adam,

On Mon, 2009-02-23 at 13:38 +0100, Adam A. wrote:

> im guessing this is somethign to do with prototype but i want a form  
> which comprises of one field to disapear if the user clicks anywhere  
> outside of that field. Ive seen this doen on [rememberthemilk.com](http://rememberthemilk.com) but not  
> sure how its done in rails.
> 
> if anyone could point me in the right direction id appreciate it.

You might just be able to add onBlur=“$(‘form\_name’).hide()” to the text  
field.

HTH,  
Bill

---

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [February 24, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/hiding-form-when-clicking-outside-field/161105/3 "2009-02-24T23:13:12Z")

</div>

thanks bill,

ill research into that more
