Dialog form - div inside form instead the other way round?

Dialog form - div inside form instead the other way round?

I have a huge form I'm using for all sorts of things. Inside that form I have a button I want to use to open a modal dialog form. However, I want that dialog only to show the contents of a selected div.

i.e.

  1. <form id="form_for_all_submits">
  2.       <div id="all_sorts_of_things">
  3.             <input.../>
  4.             <input.../>
  5. .           ...
  6.       </div>
  7.       <div id="modal_dialog">
  8.             <input.../>
  9.             <input.../>
  10.       </div>
  11. </form>
So I want to show only "modal_dialog" content in my modal dialog, but I want it to be a part of the whole form (so that the rest of the parameters (there are hidden ones) also get submitted).

Currently if I try it the ordinary way, the modal_dialog div pops outside the form tags and it's parameters don't get submitted.