Forum Discussion
GaryMcRoberts
11 years agoQrew Cadet
Hi Dan,
I have implemented this code and it works great as far as tracking the edits but it's not showing the field label. All i get in the log is was =10:00 am; now =11am without the label before the word "was". Do you know what may be causing this? The code I am using is below, thanks!:
$("#_fid_122").attr("readonly", "readonly");
var label, oldValue, newValue, log;
$("#_fid_8, #_fid_9").on("change", function() {
log = [];
_.each([8, 9], function(fid) {
oldValue = $("[name=_fid_oval_" + fid + "]").val();
newValue = $("#_fid_" + fid).val();
if (oldValue != newValue) {
label = $("label[for=_fid_" + fid + "]").text();
log.push(label + " was =" + oldValue + "; now =" + newValue);
}
});
$("#_fid_122").html(log.join("\n"));
});
I have implemented this code and it works great as far as tracking the edits but it's not showing the field label. All i get in the log is was =10:00 am; now =11am without the label before the word "was". Do you know what may be causing this? The code I am using is below, thanks!:
$("#_fid_122").attr("readonly", "readonly");
var label, oldValue, newValue, log;
$("#_fid_8, #_fid_9").on("change", function() {
log = [];
_.each([8, 9], function(fid) {
oldValue = $("[name=_fid_oval_" + fid + "]").val();
newValue = $("#_fid_" + fid).val();
if (oldValue != newValue) {
label = $("label[for=_fid_" + fid + "]").text();
log.push(label + " was =" + oldValue + "; now =" + newValue);
}
});
$("#_fid_122").html(log.join("\n"));
});