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
2 months agoCommunity 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_ED2 months agoCommunity Member
This worked for me, thank you so much!
- LesB10 days agoCommunity Member
I have an advanced developer who is helping me to limit the characters.
He tried this and other suggestions but it only works for 1 entry box on a slide.
I have multiple slides with up to 3 entry boxes on each slide. Suggestions? Thanks