I have long form around 25 form fields in web application and it covers 2 whole page. currently it is showing in the same page and cancelling the form goes back to main page. How much lengthy a form is good for modal box?
Modal boxes are helpful for quick tasks or small notices where it is too cumbersome to load a new screen, and the user will want to return to the main screen after processing the modal. It's sometimes okay for modals to overflow a window (see pinterest for example).
The form you are describing seems like the opposite of this situation:
- It has a lot of fields
- It's large
- It requires a lot of user attention
If your Web app needs to be mobile friendly, then I would NOT use a modal because a panel or page is a much better format for such an involved form.
For a Web audience I would still strongly advise against a modal because the modal background can be distracting, the user may dismiss the form by mistake, and you may get a lot of form abandonment. But visually it's more possible to make it work in a web-only context, even if it's really not a good idea.