Set email input field as required
Function: Set Email Field as Required
This action allows you to control whether a specific email input field in your application form must be filled out by the user before they can submit the form. You can also customize the message displayed to the user if they try to submit the form without entering an email in that field.
Input
- UI element: The specific email input field on your form that you want to configure.
- Required: Choose
Trueif the email field must be filled out, orFalseif it's optional. - Required message: The custom message that will appear if the user leaves the required email field empty. If left blank, a default message will be used.
Output
This function does not produce any direct output values that can be used in subsequent steps. Its effect is to modify the behavior and appearance of the selected email input field on your form.
Execution Flow
Real-Life Examples
Example 1: Make Email Field Mandatory with Default Message
Imagine you have a contact form and you want to ensure users always provide their email address.
- Inputs:
- UI element:
Email Address Field(the specific email input field on your form) - Required:
True - Required message: (Leave blank for default)
- UI element:
- Result: The "Email Address Field" will now show an asterisk or similar indicator, and if a user tries to submit the form without entering an email, they will see a default message like "This field is required."
Example 2: Make Email Field Mandatory with a Custom Message
You're building a newsletter signup form and want to guide users with a specific message if they forget their email.
- Inputs:
- UI element:
Newsletter Email Input - Required:
True - Required message:
Please enter your email to subscribe to our newsletter!
- UI element:
- Result: The "Newsletter Email Input" will become a mandatory field. If a user attempts to submit the form without providing an email, they will see the message: "Please enter your email to subscribe to our newsletter!"
Example 3: Make Email Field Optional
You have an optional feedback form where users can choose to provide their email or remain anonymous.
- Inputs:
- UI element:
Feedback Email - Required:
False - Required message: (Leave blank or clear any existing message)
- UI element:
- Result: The "Feedback Email" field will no longer be mandatory. Users can submit the form whether they fill in their email address or leave the field empty, without any error messages.