2021.2

Table Of Contents
l Maximum length: Enter a numerical value for the minimum character length
accepted for this field.
l Equal to: Use the drop-down to select another field that is already added to the
same Form. The contents of both fields must match for the data to be validated. This
is useful for confirmation fields such as for passwords, email addresses etc.
Which of these options are available depends on the validation method of the form: with
Browser validation you can only make a field required and set a maximum length.
Changing a Form's validation in HTML
In HTML, the validation method is stored in the data-validation-method attribute of the <form>
element, with the value "browser" or "jquery-validation".
A custom message to be shown when validation of a particular Form element has failed, can be
stored in the data-custom-message attribute of the Form element, for example:
<input id="email1" name="email1" data-custom-message="Enter a valid email address."
type="email" required="">
Validation in Connect 1.0.0
In Connect 1.0.0, the validation method of the template was stored using the names "standard"
and "custom". Standard has changed to "browser" and custom is now "jquery-validation".
When you open a template made with that version of the software, the template will be migrated
to use the new attribute values for the data-validation-method attribute of the <form> element.
The JavaScript file web-form-validation.js will not be migrated: delete that file and then change
the Form's validation method to jQuery Validation, as described above. When you click OK, the
new version of the web-form-validation.js file will be added.
Submitting a Form
When a form is submitted, by clicking or touching the Submit button, the name and value of
form elements are sent to the address that is specified in the Form's action (see "Adding a
Form" on page717 or "Changing a Form's properties" on page719). If the name attribute is
omitted, the data of that input field will not be sent at all.
The Form's validation should ensure that the data that the user submits is valid.
Form Elements
This topic lists the elements that can be added to a form in a Web page or in a Capture
OnTheGo template and explains how to add them to a Form, set a default value or change their
Page 721