Text Input Today we are going to learn about text input. A text input is a component where you can add text or numeric values.
An example of a text input would look like the image below.
This component allows the user to type in any type of information. That information could be a name, place, age, email, or password.
It is a very common component that you will see in many mobile apps.
How to Add Text Input To add a Text Input, grab the Text Input component.
In the properties section for text input, you can customize some of the features. We can add hints to our Text Input.
A hint allows the user to have a general idea what to put in the text input.
To add a hint, go to property and type in a hint
How to Add Code to Text Input Let's get started with coding our input. First, let's add a label to our app.
From there, let's go to the Block section. In the UI component section, click text input and add "when Text_Input1 Changes".
Next, go to the label section and add "set Label1 Text to" block.
After you are done with that, let's add the "Text_Input1 Text" block.
Now let's test our app. When you type an a value inside the text input, it should appear in the label
Math Operation In programming, you can do math operations. In Thunkable, there are blocks that are dedicated for specific operations.
To have it working, lets add a Button in the Design section and in the Block Section let's add the following blocks
When I click on the button, the value should appear 2.
Practice Quiz