views:

867

answers:

1

Hello. I have a window and a window drawer popping out from that window (Window drawers). The problem is that a form is being shown as an window item and another optional form is shown if the windows drawer is shown. I am currently submitting my window form and I would like to submit the other form too (or to assign some new fields to the form when the drawer is opened) in the same submit query. Can this be made ? Using version 3 of ExtJS.

Thanks.

+2  A: 

You should be able to submit the form programmatically. Assuming you are using FormPanels, it would be like myFormPanel.getForm().submit(); You could make this call from the click handler of the submit button in the other form, or you could make one submission dependent on the other by submitting from the actioncomplete handler of the other form.

bmoeskau
So no way to submit both with only one submit call ?
Manny Calavera
sumbit() is a method on the BasicForm class, so it is specific to each instance. Not sure what you're trying to accomplish that simply calling submit programmatically would not work for?
bmoeskau
After the main form is submitted, the `actioncomplete` event fires, so bind a fn to that event and submit the 2nd form from there.
Jonathan Julian