Tutorials

/

Text Input Element: How Do You Use It?

With the Text Input element, you can allow users to easily enter information such as their name, email address, and physical address using single-line fields, fill out the form using voice input, and save their information in the system.

‍

‍

The “Text Input” element is a basic data input element that allows users to enter single-line text within the application.

In this video, we’ll explore an example of how to use the “Text Input” element using the “Collecting User Information with a Registration Form” scenario.

First, use the “Data Sources” module to create the table structure named “UserRegistrations” as shown on the screen. Then, use “New SQL Action” to create an action named “GetUserRegistrations.” Delete the table name and retype it so that the correct schema name is prepended to the table name. Then, test the action and save it.

Switch to the “UI Design” module. Drag a “Label” element onto your page. Type “Registration Form” into the “Value” field. In the “Styling” panel, select “Heading 5 Text” as the font in the “Style” field. Add a “Text Input” element to the screen. Type “Full Name” in the “Placeholder” field. Set the “MaxLength” to “200” and enable the “AllowClear” setting. Enable the “SpeechToText” setting. Duplicate this “Text Input” element by clicking the “Duplicate” option. Drag the new element down and drop it. In the “Properties” panel, type “Email Address” in the “Placeholder” field. Set the “MaxLength” to “254.” Leave the “AllowClear” setting enabled. Turn off the “SpeechToText” setting. Duplicate it using “Duplicate,” then drag and drop it down. Enable the “SpeechToText” property in the new element. Type “Home Address” in the “Placeholder” field. Enter “400” in the “MaxLength” field. Add a “Button” element below it. Type “Save” in the “Label” field. Click the “Add Action” field and follow the steps: “onClick,” “ManageDB,” and “Save Record.” In the window that opens, select the table and choose all columns. Define the “CreatedAt,” “EmailAddress,” “FullName,” “HomeAddress,” and “Id” fields. Add the “GetUserRegistrations” action to the button. Next, click on an empty area on the page and follow the steps “Add Action,” “Initial Action,” “Custom,” “ManagedDB,” and “GetUserRegistrations” to add your action. Drag the “GetUserRegistrations” action from the “Action Tree” in the left-hand panel to the screen by holding the icon next to it. In the window that opens, select “Table” and “Outputs,” then save.

When the application is tested, the user can easily enter their first and last name, email address, and home address through a single form. Data can be entered via keyboard in the text fields, or by voice using the microphone icon.

Once the form is filled out and the “Save” button is clicked, the information is added to the system, and the table in the lower section instantly displays the entered first name, last name, email address, home address, and registration date. This element ensures that user information is recorded quickly, systematically, and verifiably.