Clean/reset values
-
Hi, I want to know how many input fields is filled by user. For 4 fields (fieldname2 – fieldname 5) I’ve tried to use the code for calculated field:
(function() {
var values = [fieldname2, fieldname3, fieldname4, fieldname5];
var nonEmptyCount = values.filter(function(val) {
return val !== ” && val !== null && val !== undefined && !isNaN(val);
}).length;
return nonEmptyCount;
})(
The returned value is still 4. How should I “clean” these input fields or how to modify function to count them properly?The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Clean/reset values’ is closed to new replies.