...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Section | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Required Controls and Validation
controls may be marked as required or optional by setting the control's required property in edit mode. Controls that are generated from an uploaded schema will automatically be designated as required or optional depending on the schema (for example, whether the control is required based on the minOccurs value). Validation for controls you generate from schema elements depends on the element’s XSD type and other schema-specific information.
...
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
...
Code Block |
---|
<xsd:simpleType name="emailType"> <xsd:restriction base="xsd:string"> <xsd:pattern value="[a-zA-Z0-9\-_][a-zA-Z0-9\-\+_]*(\.[a-zA-Z0-9\-\+_]+)*@([a-zA-Z0-9\-_]+\.)+[a-zA-Z]{2,6}"/> </xsd:restriction> </xsd:simpleType> |
You can also create a custom email pattern on Text control. This would be useful to ensure users only enter their work or school email, for example. Drag a text control from the palette and set the pattern as follows, replacing "@domain.com" with your domain.
Code Block |
---|
[a-zA-Z0-9\-_][a-zA-Z0-9\-\+_]*(\.[a-zA-Z0-9\-\+_]+)*@domain.com |
...
- Apply patterns to a control - Like other control properties, the pattern property will not need to be redone when you upgrade .
- Modify the built-in values in the types.xsd file. Be aware that if you modify the types.xsd file, you will have to make this change each time you perform a upgrade or apply a patch.
...
If you are using Online, you will not have access to types.xsd. Both cloud and in-house customers, can override the pattern in the phone control by setting its pattern property. You can only restrict a built-in pattern (such as the phone control) but not change the pattern via the pattern property. For example you can add the pattern 203-\d{3}-\d{4}. Now all phone numbers must start with area code 203.
Tip |
---|
The Pattern property will not need to be redone when you upgrade . |
A pattern such as ##-####-#### or ####-###-### is not a simple restriction. To impose validation against this pattern you must start with a Text control rather than a Phone control
...
- Apply patterns to a control - Like other control properties, the pattern property will not need to be redone when you upgrade .
- Modify the built-in values in the types.xsd file. Be aware that if you modify the types.xsd file, you will have to make this change each time you perform a upgrade or apply a patch.
...
If you are using Online, you will not have access to types.xsd. Both cloud and in-house customers, can override the pattern in the phone control by setting its pattern property. You can only restrict a built-in pattern (such as the phone control) but not change the pattern via the pattern property. For example you can add the pattern 203-\d{3}-\d{4}. Now all phone numbers must start with area code 203.
Tip |
---|
The Pattern property will not need to be redone when you upgrade . |
A pattern such as ##-####-#### or ####-###-### is not a simple restriction. To impose validation against this pattern you must start with a Text control rather than a Phone control
...
Modify the types.xsd file
frevvo OEM partners may choose this method when customizing . The built-in values are shown in the image below:
...