- What is the Date element?
- What is Client Validation?
- How do I validate a date?
- Download the Form Package
What is the Date element?
The Date Element allows users to capture the past, present or future date stored in a localized format. In the U.S., the date will appear as Month-Day-Year.
What is Client Validation?
Client Validation allows form builders to prevent illegitimate data to be uploaded to the server and to set multiple validation criteria on an element.
How do I validate a date?
PLEASE NOTE: In this example, we'll be implementing validation to ensure the user enters a date in the future and not a date from the past.
STEP 1. Add two Date elements to your form. For this example, the data column names are date1 and date2, respectively.
STEP 2. In the Date1 element, place the following in the Dynamic Value field:
This will dynamically populate the element with the current date.
In the Condition Value of the element, place the word false. This will hide the element from the user's device.
STEP 3. In the Client Validation field of the Date2 element, place the following:
This will convert the dates to numbers and check that Date2's date is greater than Date1's date.
In the Validation Message field, place the following:
"Please choose a date later than today's date."
PLEASE NOTE: The message must be in double quotes or the message will fail to appear on the user's device.
STEP 4. Save your form.
STEP 5. Test the functionality out on your device.
Download the form package below to use as an example.