Forum Discussion

Jenny_ED's avatar
Jenny_ED
Community Member
2 months ago

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...
  • Nedim's avatar
    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);