frevvo v9 is no longer supported. Please visit Live Forms Latest for our current Cloud Release. Earlier documentation is available too.
Valid Forms
Required Controls and Validation
On form load, required controls that do not contain valid values have a visual indicator. For example, an invalid control has a yellowish background when a required field is missing a value, and additionally, a warning icon when a control (either required or not) contains an invalid value.
You can change the background color for required fields by creating a style and applying it to your form. Refer to the Styles topic for the details.
Here is a form that is missing values in required fields.
Here is the form when the user has entered valid values into the required fields.
And another that has a value in the field but the value is invalid for the given field type. Notice the error message, yellow background and the warning icon. When the user enters a valid value in the phone control and clicks the Submit button the form will be submitted.
Note that the Email Address and Phone controls are optional. The form may be submitted even though there are no values in these controls. However, if the user enters an invalid value in one of the fields (required or not),
When a form has sections or tabs, the submission may not be allowed due to invalid controls that are not currently visible. For example, a section that is collapsed or a tab that is not currently selected may have an invalid control. This is indicated in the header section and tab label color changing to red.
Troubleshooting Hidden Required Fields
Designers may come across an issue while testing their forms/flows in which the Submit or Continue buttons do not work even when all the required fields in the form are filled in. This usually happens when you have a hidden field that is required or that has invalid value. Please check if your form has any hidden fields or sections where the required property is set.
Use developer tools in your browser to find hidden controls which are invalid or required, and are causing the submit button to remain disabled.
Open your form in Test Mode or using the Share URL. Fill it out and attempt to click Submit/Continue. If Submit/Continue remains disabled, continue to step 2.
Open your browser developer tools. This varies by OS and browser, but on a PC you can use the keyboard shortcut Ctrl-Shift-i.
In Elements/Inspector tab of developer tools, search for all instances of s-invalid. This will take you to the HTML of all the controls which are in invalid state.
You can generally get the name, indicated by cname, of the control from that HTML.
Note that if a required control is inside a hidden section, then that section will also be invalid and you will see s-invalid in its HTML. You will have to continue searching further to get to the actual control. Once you locate the section(s)/control(s) that are invalid, check your business rules to see if they are being mistakenly set to required or invalid.
Invalid Form Notification for Users
Consider the scenario where there are several required fields in a form and the user clicks the submit button having missed a few of them.
The Submit button is never dimmed.
If you click Submit and the form is invalid (cannot be submitted) all invalid control fields are highlighted with a background color. The color shown in the image is the default. The designer can specify this color by changing the value for (Submit Error Highlight) in a Style and then applying that style to the form.
Once the required fields have been filled and/or invalid data has been corrected, the highlight color will disappear and the form can be submitted by clicking the Submit button.
The designer can add a message control(s) to the form with a customized message to alert the user that the form cannot be submitted and what they need to do to correct it.
The message control must contain your text in the message area and the CSS class f-submit-error specified in the CSS class property.
A message control with this CSS class is invisible by default. When the error condition is met, these message controls become visible.
You can use select a Message Type and use all the properties on the Style tab to style your message.
Once the required fields have been filled and/or invalid data has been corrected, the highlight color will disappear and the form can be submitted by clicking the Submit button.
The error message will automatically clear when the form becomes valid.
Sometimes, you click the Submit button and see that the form will not submit even when all required fields appear to be filled with valid data. The cause is always a hidden required field with no data or a hidden field with invalid data. You can find troubleshooting tips to resolve the issue here.
If you are using a
version prior to v6.1.3, the submit button remains greyed out until all required fields are filled and all fields contain valid data. This ensures that it is not possible to submit a form with an invalid value. When all values in the form are valid, the submit button will automatically get enabled and the form can be submitted.
If you are using
v6.1.3, the submit button will be greyed out until the form is valid. If users click on the Submit button in a form that contains invalid data or required fields that are empty, the popup shown in the image will display. The enable if valid checkbox on the submit button of a form must be checked (default) to see the alert. This message can be translated into other languages.
Optional Sections
Optional sections can cause the validity of a form to change dynamically. For example, consider the following form:
The Required property is selected for the Name field and all the controls inside of the Address section. The Required property is NOT selected on the Address section control making the section and the controls inside of it optional. If the user enters a valid value in the Name field then clicks Submit the form may be submitted. However, if the user chooses to enter an address, then the controls in the Address section become required as indicated by the yellow background in the City, State and Zip fields.
If the user enters a value in the Street and City fields, then clicks Submit, the Zip field is highlighted with a background color and the form will not be submitted until valid values are entered in the three newly required fields.
If the user changes his/her mind and removes the value from the Street field, will recalculate the validity of the form and infer that the Address section is no longer invalid since it is optional. The generated XML instance document will also not contain an address element. Once again, is automatically ensuring that it is not possible to submit a form that is in an invalid state and that would generate an invalid document.
You can find information about the section Required property here.
Message controls can be included inside an optional section provided the Save Value property is unchecked.
Input Validation
Form fields added from ' control palette have built-in validation rules. The table below details the default validation for each control type in ' palette. Patterns added to a control change the defaults.
Control Type | Default Validation Rule |
|---|---|
Text | xsd:string |
Text Area | xsd:string |
Date | xsd:date |
xsd:string with pattern [a-zA-Z0-9\-_][a-zA-Z0-9\-\+_]*(\.[a-zA-Z0-9\-\+_]+)*@([a-zA-Z0-9\-_]+\.)+[a-zA-Z]{2,6} | |
Money | xsd:double |
Phone | xxxxxxxxxx, xxx-yyy, xxx.yyyy, xxx-yyyyzzzz, xxx.yyy.zzzz, |
Time | xsd:time |
Quantity | xsd:decimal with pattern [\-+]?[0-9]+ |
Number | xsd:double |
T/F | xsd:boolean |