Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kruger77
Copy link
Contributor

a simple example who shows how to limit the text for the Text Input OBJ

a simple example who shows how to limit the text for the Text Input OBJ
Copy link

vercel bot commented Feb 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gdevelop-wiki ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 6:35am

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)
Copy link
Collaborator

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

Copy link
Collaborator

@Bouh Bouh left a 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

@D8H D8H changed the title Update with limit text example.md [Text imput] Limit text example Apr 26, 2024
@axp778
Copy link

axp778 commented Sep 17, 2024

i bent no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants