0

I wanted to pass all form values including set values to http request for Update record but its passing only modified values in Ext JS 7.5.1. How can I pass all form values to https payload?

I tried this:

text: 'Submit',
        handler: function() {
            var form = this.up('form'), // get the form panel
                record = form.getRecord(); // get the underlying model instance
            if (form.isValid()) { // make sure the form contains valid data before submitting
                form.updateRecord(record); // update the record with the form data
                record.save({ // save the record to the server
                    success: function(user) {
                        Ext.Msg.alert('Success', 'User saved successfully.')
                    },
                    failure: function(user) {
                        Ext.Msg.alert('Failure', 'Failed to save user.')
                    }
                });
            } else { // display error alert if the data is invalid
                Ext.Msg.alert('Invalid Data', 'Please correct form errors.')
            }
        }
    }
pritee
  • 1

0 Answers0