PDA

View Full Version : using form panel like an html form



olriche38
29 Jan 2010, 4:29 AM
I would like to know if it's possible to make a form with ExtJs like a "normal html form".

I explain, I would send a file in an another url, an I would have a redirection, not staying in the same URL.

urlOfMyForm --> on submit --> urlOfFileReception.


buttons: [{
text: 'Envoyer',
handler: function(){
if(fp.getForm().isValid()){
fp.getForm().submit({
url: '<?php echo $this->url(array('action' => 'analyse')); ?>',
waitMsg: 'envoie en cours...',
waitTitle: 'Veuillez Patientez',
method: 'POST',
params: {
lieuId: searchName.getValue()
}
});
}
}
},{
text: 'Annuler',
handler: function(){
fp.getForm().reset();
}
}]Thx

wm003
29 Jan 2010, 5:09 AM
Use "standardSubmit" when creating the formpanel


var fp = new Ext.form.FormPanel({
standardSubmit: true,
...