Currently, I have a form that I use as a page for viewing / editing contacts. Instead of sending values ββeach time a single field is edited, I try to use the save button, which would compile the values ββobject from the form and send them to the database. The problem I'm having is that when I try to get the value of an input field, if that input field has not been edited, the return value will be "
$('#view-contact-first-name').editable("getValue")
I tried to view the x-editables documentation and tried to use the savenochange: true parameter, but that also did not solve my problem. Does anyone know what I can do wrong. (If necessary, can send more code)
$('#view-contact-first-name').editable({
type: 'text',
name: 'FirstName',
emptytext: "Enter First Name",
savenochange: true,
validate: {
view_contact_first_name: function (v) { if (v == '') return 'Required field!' }
},
display: function () {
$(this).text(contact.FirstName);
}
});