In reply to: Bartosz Kusiak
The function is generic and it can be use for text, number and choose attributes
function waitForElement(id, callback) {
const interval = setInterval(() => {
// Find the element by ID
var container = document.getElementById(id);
// Find the input within the container
var inputElement = container.querySelector(".base-input");
// If the input element is found, clear the interval and call the callback
if (inputElement) {
clearInterval(interval);
callback(inputElement);
}
}, 100); // Check every 100 milliseconds
}
// change mode for field xyz
waitForElement("#{FLD:1029}#", (element) => {
element.setAttribute("inputmode", "none");
});
// change mode for field abc
waitForElement("#{FLD:570}#", (element) => {
element.setAttribute("inputmode", "none");
});
Lately I was not able to get my hands on Tablet, but it looks promising. I will let you know if it works as intended with bunch of other JS/Form rules actions that we use.