I would like to setup an alert message that tells me when a field has more or less than x number of items in a sorted or unsorted list
Example: Field = remainingTasks
In field there is a list of items present and I want to count how many list items (sorted or unsorted) are existing in that field when I enter the form
I tried these examples but could figure out how to properly adapt them to work:
//Counts the number of List Items in a field
/*
var theList = document.querySelector("[id*='remainingTasks_']");
alert(theList);
/*
var theList = document.getElementByRegex("^remainingTasks_.*").getElementsByTagName("ul");
var numberOfItems = theList.length;
alert(numberOfItems);
*/