PDA

View Full Version : Switch between standform and ajax form



PV-Patrick
22 Oct 2010, 10:17 AM
Is it possible to switch a FormPanel's standardSubmit and url option on the fly based on say a radio button selection? Switching the standardSubmit and url options back and forth?

Condor
22 Oct 2010, 12:30 PM
You can if you initially create your form with standardSumbit:true (otherwise an event handler is attached that stops a standard submit).

PV-Patrick
22 Oct 2010, 12:33 PM
I am currently creating the form with the standardSubmit: true, however I can't get it to switch back to false when I click the button to submit the form. I couldn't find a set method via the API and doing: this.standardSubmit = false; isn't working either.

Condor
22 Oct 2010, 9:31 PM
It's:

this.getForm().standardSubmit = false;

PV-Patrick
22 Oct 2010, 9:38 PM
Cheers Condor, that just made my day!! :D