Home > DeveloperSection > Forums > How to add data into the POST method of a form in ExtJS?
Sanjay Sharma
Sanjay Sharma

Total Post:45

Points:315
Posted on    May-19-2016 6:17 AM

 sencha extjs JavaScript  Sencha  Sencha Cmd 
Ratings:


 1 Reply(s)
 314  View(s)
Rate this:
I have created a simple form using ExtJS, my problem is I am getting problem to be sent data through POST method. I google it and tried using this code:
form.setValues({
    name: value;
})
but, its not sending data or we can say that not setting the value to be sent.
Please, guide me how can I solve this issue.
Thank you.


Tarun Kumar

Total Post:210

Points:1614
Posted on    May-19-2016 8:50 AM

When you submit the form set the properties into params: , below I have provided an example:
this.myWindow.get(0).getForm().submit({
  url : 'path_for_action',
  params : {name : value},
  success : function(form, action) {
     // do your stuff here
  },
  failure : function(form, action) {
     // do your stuff here
  }
}
I hope it will be helpful for you.

Don't want to miss updates? Please click the below button!

Follow MindStick