Share feedback, ideas and get community help

Updated 5 months ago

Java script for a character limiter for text input?

At a glance

A community member is looking for a JavaScript code to limit the number of characters in a text input. The comments suggest that a solution was provided, but it did not work initially. Another community member shared a YouTube video demonstrating a similar feature. After trying the solution provided in the comments, the community member found it to be working and expressed gratitude. However, some community members raised concerns about the solution's compatibility with other chat platforms, such as WhatsApp, which may not have the ability to directly restrict the length of a message. The discussion suggests that the ideal solution should be more intuitive for customers and consistent across different chat platforms.

Useful resources
Hi, does anyone have a Java script for a character limiter for text input? thanks for the help in advance
1
B
m
L
11 comments
After collecting the answer, you can add a Set variable block that gets the answer length: {{reposta}}.length, then use a condition block that checks if the length in more than X
Hi, thank you for your answer, it didn't work, the idea is not to let the person type more than the maximum characters allowed, like it reached 10 characters and it won't accept any more, thanks for your help, I keep trying here, I saw a video on YouTube where does the person do this, I'll try to leave the link here, I don't know if it's allowed, thanks again
πŸ‘‡ it didn't work
Attachment
image.png
Thank you, it worked here, it's working ok, gratitude is the word πŸ˜€
The one in the YouTube video is different but the one you gave me here helps.πŸ˜€
This way is more intuitive to customers. Hope it gets official in Typebot.
You need to take into consideration other chat platforms
For example WhatsApp does not have the ability to directly restrict the length of a message
So typebot need to embrace the same chat logic here for consistency
how you did that ?
Add a reply
Sign up and join the conversation on Discord