# formInDialog out of an Dialog does work unexpected

**URL:** <https://forum.servoy.com/t/formindialog-out-of-an-dialog-does-work-unexpected/13690>\
**Category:** Classic Servoy\
**Created:** [March 7, 2011, 11:20am UTC](https://forum.servoy.com/t/formindialog-out-of-an-dialog-does-work-unexpected/13690 "2011-03-07T11:20:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefbrt](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@stefbrt](https://forum.servoy.com/u/stefbrt)\
**Post date:** [March 7, 2011, 11:20am UTC](https://forum.servoy.com/t/formindialog-out-of-an-dialog-does-work-unexpected/13690/1 "2011-03-07T11:20:16Z")

</div>

Hi

I have an formInDialog, this formInDialog should open an second formInDialog and in this formInDialog I want to add something and onClose I want to go back to the first formInDialog and do the work there. Now the problem is that the first formInDialog is hidden when the second formInDialog is opened from a method in the first formInDialog and if the first formInDialog is hidden it will execute the onHide method and I don’t want that.

The first formInDialog has to be modal! I tried with a second nonmodal fromInDialog, i tried with formInWindow, but nothing worked! What have I to do to get the first formInDialog stay while the second formInDialog is opened?

Regards, Stef

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [March 7, 2011, 11:32am UTC](https://forum.servoy.com/t/formindialog-out-of-an-dialog-does-work-unexpected/13690/2 "2011-03-07T11:32:56Z")

</div>

Hi Stef,

If you give the FID a name (see params in showFormInDialog) then the dialog will stay open when another FID is opened (not with the same name of course).  
In short, (uniquely) name the FID object and you will be fine.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![stefbrt](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@stefbrt](https://forum.servoy.com/u/stefbrt)\
**Post date:** [March 7, 2011, 3:00pm UTC](https://forum.servoy.com/t/formindialog-out-of-an-dialog-does-work-unexpected/13690/3 "2011-03-07T15:00:53Z")

</div>

Yes this was the Problem! Thanks for the help it saved me much time!

Regards, Stef
