In reply to: Jarosław Dziekan
This solution works fine for text attributes. Thanks a lot.
Is it possible to make one also for choose attributes? Choose attributes with autocomplete mode.
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");
});