Forum Discussion
_anomDiebolt_
Qrew Elite
Normally I test everything before I post but I didn't in this case and I should have.
Checkboxes are a little different than other form elements as to how their on/off value is represented. To get the current state of a checkbox you have to use this jQuery which returns true or false:
$("#_fid_" + fid).prop("checked");
Don't use this code to get the value of a checkbox: newValue = $("#_fid_" + fid).val();
So you will have to refactor the code to test (1) the type of the control ("checkbox" vs "text"), (2) if the oldValue is equal to the newValue and from there push the appropriate message into the log array.
I am afraid that I don't have time to write the code and I could likely make another typo or oversight unless I worked from a live demo (and I don't have time for that either).
Checkboxes are a little different than other form elements as to how their on/off value is represented. To get the current state of a checkbox you have to use this jQuery which returns true or false:
$("#_fid_" + fid).prop("checked");
Don't use this code to get the value of a checkbox: newValue = $("#_fid_" + fid).val();
So you will have to refactor the code to test (1) the type of the control ("checkbox" vs "text"), (2) if the oldValue is equal to the newValue and from there push the appropriate message into the log array.
I am afraid that I don't have time to write the code and I could likely make another typo or oversight unless I worked from a live demo (and I don't have time for that either).
ChanceStorey
4 years agoQrew Member
Any best-practice advice for 2021? Trying to follow directions but even when creating and utilizing my [-] field it seems like enough things have changed to where it's not as simple as following the directions that are on this thread.