# Avoid close form in dialog

**URL:** <https://forum.servoy.com/t/avoid-close-form-in-dialog/12485>\
**Category:** Classic Servoy\
**Created:** [July 17, 2010, 11:24pm UTC](https://forum.servoy.com/t/avoid-close-form-in-dialog/12485 "2010-07-17T23:24:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roberto\_Blasco](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@Roberto\_Blasco](https://forum.servoy.com/u/Roberto_Blasco)\
**Post date:** [July 17, 2010, 11:24pm UTC](https://forum.servoy.com/t/avoid-close-form-in-dialog/12485/1 "2010-07-17T23:24:49Z")

</div>

Hi all!

How can I avoid a form in dialog to be closed when I click the close cross in the form window header?

The question is for both, webclient and servoyclient … ![:D]( "Very Happy")

Best regards. Roberto.

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [July 18, 2010, 3:51am UTC](https://forum.servoy.com/t/avoid-close-form-in-dialog/12485/2 "2010-07-18T03:51:00Z")

</div>

If you attach a method to the “onHide” event of the form, the form will not close if you return false in that method.  
Last time I checked this was working in web client as well.

---

<div class="post-metadata">

**Author:** ![Roberto\_Blasco](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@Roberto\_Blasco](https://forum.servoy.com/u/Roberto_Blasco)\
**Post date:** [July 18, 2010, 7:46am UTC](https://forum.servoy.com/t/avoid-close-form-in-dialog/12485/3 "2010-07-18T07:46:48Z")

</div>

Thanks a lot!! ![:D]( "Very Happy") ptalbot.
