Forum Discussion
Limiting Text Entry to One Character Issue
- 12 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);
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
The code above will work regardless of whether there is one or more text entry fields. However, if you're facing issues and need further troubleshooting, it might be helpful to share your code file so someone can inspect it.
- LesB11 months agoCommunity Member
Thanks Nedim!
- LesB11 months agoCommunity Member
Hi Nedim,
We're stuck. The goal is to have multiple text entry fields on a single slide With a real-time counter.
- Nedim11 months agoCommunity Member
Hi LesB,
Would you mind moving this to a new topic, such as 'Multiple Text Entry Fields with a Real-time Counter'? This way, others looking for a similar solution can find it more easily and avoid confusion. This thread has become a bit unclear, as the codes shared are for different scenarios and not directly related to the original inquiry. I’ll post a new solution and update the code for you shortly. - Nedim11 months agoCommunity Member
I came up with this. Do you actually need to prevent typing past 5 characters?
- LesB11 months agoCommunity Member
Thank you!!!!
Related Content
- 9 months ago