When a user fills in a field in your webform, often you will need to ensure they submit the correct information. This can be guided by the Validation options available on the right-hand side of the screen in the W50 Designer, in the Properties Panel.
These options will allow you to restrict what information is given within the parameters, such as a minimum required length for a number or name. The first option dictates whether the field is required to be filled in, and a message will display if the user tries to submit the form without completing all of the required fields.
Number Validation
For example (as shown below), a field labelled 'Meals' is required to be filled in, and the validation restricts the amount of expense allowed on Meals, between €1 and €50, to calculate expenses accrued for Meals.
If the user enters any value either below the minimum, or above the maximum, the Validation message will appear underneath the webform field. This message informs the user that they have provided an invalid entry, with some guidance as to how to comply. The messages can be easily edited to provide clarity to the user.
Date Validation
Below is an example for a Date field, and the options can be edited to restrict the available dates to input. This could be used for an event with a specific date range, or date of births restricted to a certain age limit.
Text Validation
Here is an example for the Validation options available in a Text field. This can ensure a user does not exceed the Max length, for example when entering a competition tie-breaker, and the answer needs to be under a certain character count.
The 'Pattern' validation can be used to restrict the types of characters allowed in a text field. For example, an Account Number must be 7 characters long, and must start with '01'. Using a custom Pattern here will not accept any submissions outside of those rules.
In Pattern terms, if the Pattern listed is: [a-zA-Z]*, then only lowercase and uppercase alphabetical characters will be allowed. No numbers, punctuation or any special characters would be accepted.
There are many combinations that can be used to make sure your webform fields will only accept and record the necessary and pertinent information, and using these Validation settings can help you achieve the correct results in your webform submissions.
Comments