w2ui
Home
Get started
Demos
Docs
Blog
Support
Layout
Grid
Toolbar
Sidebar
Tabs
Form
Popup
Utilities
ver 1.3
ver 1.4
ver 1.5
ver 2.0
Form
Overview
Events
Properties
Methods
Fields
Numeric
Date & Time
Drop Lists
Multi Selects
Upload
Custom
w2form.getChanges
Compares current record object to original and returns difference.
getChanges()
Returns
object
.
Description
This method compares
.record
with
.original
and returns the diff object.
If you have following form:
$('#form').w2form({ name : 'form', recid : 10, url : '/server/form/path', formURL : '/server/path', fields: [ { name: 'first_name', type: 'text', required: true }, { name: 'last_name', type: 'text', required: true }, { name: 'email', type: 'email' } ], actions: { "save": function (target, data) { this.validate(); }, "reset": function (target, data) { this.clear(); } } });
You can do:
var changes = w2ui['form'].getChanges(); console.log(changes);
User Comments
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus