HOW TO ADD DATA INTO THE POST METHOD OF A FORM IN EXTJS?

Sanjay Sharma

Total Post:45

Points:315
Posted by  Sanjay Sharma
 732  View(s)
Ratings:
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.
  1. Tarun Kumar

    Post:214

    Points:1642
    Re: How to add data into the POST method of a form in ExtJS?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!