Form in a Popup

It is a frequent task to open a form inside a popup. I have seen many examples from the community when it was not done correctly. The demo below demonstrates how to do this right. The form take entire available space of the popup.