Get value of url field
Function: Get value of url field
This action helps you retrieve the web address (URL) that a user has entered into a specific URL Input Field on your application's screen. Once retrieved, this URL can be stored in a variable for you to use in other parts of your application, like displaying it, saving it, or using it in another action.
Input
- UI element This is the specific URL Input Field on your application screen from which you want to get the entered web address. You must select an existing URL Input Field component from your application's design.
Output
- Answer
This is the name of the variable where the retrieved URL will be stored. You can then use this variable in subsequent actions or display it. If you don't specify a name, it will default to
URL_FIELD_ANSWER.
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Get value of url field" action in your application:
Example 1: Saving a User-Provided Website Link
Imagine you have a form where users can submit their personal website link. You want to capture this link and store it in your database.
- Inputs:
- UI element: Select the URL Input Field named
User_Website_Linkfrom your form. - Answer:
SubmittedWebsite
- UI element: Select the URL Input Field named
- Result: If the user enters "https://www.myportfolio.com" into the
User_Website_Linkfield, this URL will be stored in a variable calledSubmittedWebsite. You can then use another action to save the content ofSubmittedWebsiteto your database.
Example 2: Displaying a Resource Link on Another Page
You have a page where users input a link to a document. After submission, you want to display this link on a confirmation page.
- Inputs:
- UI element: Select the URL Input Field named
Document_URL_Inputfrom your submission form. - Answer:
ConfirmedDocumentLink
- UI element: Select the URL Input Field named
- Result: If the user enters "https://docs.company.com/report.pdf" into the
Document_URL_Inputfield, this URL will be stored in theConfirmedDocumentLinkvariable. You can then navigate to a confirmation page and display the value ofConfirmedDocumentLinkto the user.
Example 3: Validating a Download Link Before Processing
Your application allows users to provide a download link for a file. Before proceeding with a download process, you want to ensure you have the correct link.
- Inputs:
- UI element: Select the URL Input Field named
File_Download_Linkon your form. - Answer: (Leave blank to use default)
- UI element: Select the URL Input Field named
- Result: If the user enters "http://oldserver.net/software.zip" into the
File_Download_Linkfield, this URL will be stored in the default variableURL_FIELD_ANSWER. You can then add a conditional action to check if this URL starts with "https://" for security, or if it contains a specific domain, before initiating the download.