-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Text imput] Limit text example #167
base: main
Are you sure you want to change the base?
Conversation
a simple example who shows how to limit the text for the Text Input OBJ
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
You can limit the characters in a text input field by setting a maximum number of characters allowed for input. This is typically achieved by implementing a condition that checks the length of the input text against the specified limit, preventing further input when the limit is reached. | ||
|
||
You can limit the text input using the following expression: ***StrLength(TextInput.Text()) < [numeric_variable]***. | ||
![TextInputExample](https://github.com/GDevelopApp/GDevelop-documentation/assets/58533713/10266e06-f7a4-4cd1-bfc0-14eec04f0825) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd simply remove the image and use a code syntax for the expression, because first the image is small, and take place for something that can just be text.
For code you can use this syntax:
Maybe you should rephrase by giving an example, here with 10max characters.
StrLength(TextInput.Text()) <= 10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd simply remove the image link and use a code syntax for the expression, because first the image is small, and take place for something that can just be text.
For code you can use this syntax:
Maybe you should rephrase by giving an example, here with 10max characters.
StrLength(TextInput.Text()) <= 10
i bent no |
a simple example who shows how to limit the text for the Text Input OBJ