Get value of input field
Function: Get value of input field
This action allows you to retrieve the current text or data entered into a specific input field on your application's form. Once retrieved, this value can be stored in a variable for use in subsequent actions or logic within your application. It's particularly useful for capturing user input and processing it further.
Input
- UI element (Required) The specific input field on your form from which you want to retrieve a value. This must be a UI element of the "input-field" type. You will select this from the available UI elements in your application.
Output
- Answer (STRING)
This represents the name of the variable where the actual text or data from the input field will be stored. You can specify a custom name for this variable (e.g.,
customerName,orderQuantity), or if left blank, it will default toINPUT_FIELD_ANSWER. The value stored in this variable will be the content of the input field.
Execution Flow
Real-Life Examples
Here are some practical examples of how you can use the "Get value of input field" action:
Example 1: Capturing a Customer's Name from a Registration Form
- Inputs:
- UI element: Select the "Customer Name" input field on your registration form.
- Answer: Type
customerFullName(This will be the name of the variable where the customer's name is stored).
- Result: If a user types "Alice Wonderland" into the "Customer Name" field, the text "Alice Wonderland" will be stored in a variable named
customerFullName. You can then use this variable in a "Send Email" action to personalize a welcome message.
Example 2: Retrieving a Product Quantity from an Order Form
- Inputs:
- UI element: Select the "Quantity" input field next to a product on your order form.
- Answer: (Leave blank to use the default variable name)
- Result: If a user enters "3" into the "Quantity" field, the number "3" will be stored in a variable named
INPUT_FIELD_ANSWER. You can then use this variable to calculate the total price or update inventory.
Example 3: Storing a User's Feedback Comment
- Inputs:
- UI element: Select the "Feedback Comment Box" on your feedback submission page.
- Answer: Type
userComment
- Result: If a user types "The app is very intuitive and easy to use!" into the comment box, this entire sentence will be stored in a variable named
userComment. This variable can then be saved to a database or sent to a support team.