I'm working with standard admin form, which has
'add_more' button for one of fields.
My task is to move some fields to jQuery UI Dialog just for usability. When dialog was closed I manually append it's content to form so It sends normally.
The problem appears when some core ajax is sending while some form parts are in the dialog (i.e. outside of
form tag because jQuery UI Dialog appears in the bottom of
'add_more' button as example. When I click on it, the form serializes for AJAX without some inputs in the dialog.
The jQuery Form Plugin (which used by Drupal) has option
beforeSerialize. I think it can help me but I don't know how I can extend Drupal.ajax.options to set something custom.