Forum Discussion
Jenny_ED
2 months agoCommunity Member
Limiting Text Entry to One Character Issue
Hello everybody! As I work on a crossword puzzle, I would like to limit the text entry fields to only contain one character. Previously, in 2023, I have succeeded doing it using the JavaScrip...
- 2 months ago
Try
const Inputs = () => { const inputs = document.querySelectorAll('.acc-textinput'); inputs.forEach((input) => { input.setAttribute('maxlength', '1'); input.setAttribute('autocomplete', 'off'); }); } setTimeout(Inputs, 100);
Nedim
Community Member
Try
const Inputs = () => {
const inputs = document.querySelectorAll('.acc-textinput');
inputs.forEach((input) => {
input.setAttribute('maxlength', '1');
input.setAttribute('autocomplete', 'off');
});
}
setTimeout(Inputs, 100);
Jenny_ED
2 months agoCommunity Member
This worked for me, thank you so much!