The following codes are working on the Kintone desktop version, but not on the Kintone mobile version. Here I want to select all the text fields that have “input-text-cybozu” class and are not “disabled” inside a table.
let tblOne = document.querySelectorAll('table.subtable-gaia')[1];
let tblOneInput = tblOne.querySelectorAll('input.input-text-cybozu:not(.input-number-cybozu):not([disabled])');
Like the other post you asked, I can't see the whole script, but I assume the reason is that you are specifying classes that don't exist in a mobile version.
Check the other post for details.
Thank you for your assistance. It is getting better now.
But I still have questions about getting the document.querySelectorAll() to work.
If I use the document.getElementsByClassName('subtable-row-gaia');
it will return me all table rows as an HTMLCollection. I want to select all the input text fields that are inside of table rows and are not disabled.
I got an error saying querySelectorAll is not a function.
let tblZeroInput = document.querySelectorAll('.subtable-row-gaia .forms-text-gaia');
for (let i = 0; i < tblZeroInput.length; i++) {
tblZeroInput[i].addEventListener('click', function (e) {
if (e.target.value == checkMark) e.target.value = '';
else e.target.value = checkMark; // toggle
}, false);
}