Topics List
Basic Concepts

Inputs
Textfield and _Get_Text()

In Kenzie, textfields are used to capture user input, such as usernames and passwords. The _Get_Text() function is used to retrieve the text entered into these fields. By connecting a button in the design section to a function in the code section, you can create interactive elements that respond to user actions.
Let´s take a closer look at the provided code snippet:

Copy Text (You can Paste it in your code using Ctrl-B o Ctrl-V)

  1. The button_login_onRelease function is triggered when the associated button is clicked or pressed.

  2. Inside the function, the _Get_Text() function is used to retrieve the text entered in the ''textfield_username'' and ''textfield_password'' textfields.

  3. The _If statement checks if the entered username is not ''Luis'' or the entered password is not ''abc123''. If either condition is true, it displays an ''Invalid Credentials'' message using the _Msgbox() function.

  4. If the username and password are correct, the _Msgbox() function displays a ''Login OK'' message, indicating successful login, and the _Goto() function navigates to a different part of the application (in this case, ''1p'').

This is how it looks like in the Kenzie IDE



This example demonstrates how you can use textfields, buttons, and functions to create interactive login forms in Kenzie applications.



You can download this example from the link below.

Class_Rar_0__17.rar