Live Forms v7.1 is no longer supported. Click here for information about upgrading to our latest GA Release.
Data Sources
Basic Concepts
When users submit a form that was created wholly or in part from schemas, you will see in the Submissions repository one XML instance document for each global schema element. You also will see one XML document for the form itself, which references any controls you dragged in from the palette. All XML documents are automatically validated against their schemas.
When you upload a schema to
At a high level, when you work with schemas you do the following:
Upload your schema to one of your
applications
Choose the global elements you want and add them to your form’s Data Sources
Generate form controls from the global elements you’ve added
Modify the controls (if necessary) to suit your form
These steps are discussed in detail below.
"form" Schema
automatically generates an XSD schema representation of your form as you drop controls from the palette to the form designer canvas. You can download this XSD using the schema button on the forms home page. The XSD elements are named after the control names. The types are based on which control you selected from the palette. For example a Quantity control will appear as an xsd:integer. A dropdown will be an xsd:simpleType restriction. Controls with patterns such as the Zip will have an auto-generated type with your pattern. Click "expand Source" for an example.
.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.frevvo.com/schemas/_0LaA4HRREeGXK6NO-8HLWA"
xmlns:frevvo="http://www.frevvo.com/appinfo"
targetNamespace="http://www.frevvo.com/schemas/_0LaA4HRREeGXK6NO-8HLWA">
<xsd:element name="CompanyInfo" type="CompanyInfoType">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="CompanyInfoType">
<xsd:sequence>
<xsd:element name="CustomerInformation" type="CustomerInformationType">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Section</frevvo:displaytype>
<frevvo:label>Customer Information</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CustomerInformationType">
<xsd:sequence>
<xsd:element minOccurs="0" name="CompanyName" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Text</frevvo:displaytype>
<frevvo:label>Company Name</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element minOccurs="0" name="Revenue">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Money</frevvo:displaytype>
<frevvo:label>Revenue</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:double"/>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="Employees">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Quantity</frevvo:displaytype>
<frevvo:label>Employees</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:pattern value="[\-+]?[0-9]+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="IncorporationDate" type="xsd:date">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Date</frevvo:displaytype>
<frevvo:label>Incorporation Date</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element minOccurs="0" name="State" type="StateType">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Dropdown</frevvo:displaytype>
<frevvo:label>State</frevvo:label>
<frevvo:itemLabel>CT</frevvo:itemLabel>
<frevvo:itemLabel>MA</frevvo:itemLabel>
<frevvo:itemLabel>NY</frevvo:itemLabel>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element minOccurs="0" name="Zip">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Text</frevvo:displaytype>
<frevvo:label>Zip</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{5}|\d{5}-\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="Phone">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Phone</frevvo:displaytype>
<frevvo:label>Phone</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{3}-\d{4}"/>
<xsd:pattern value="\d{3}\.\d{4}"/>
<xsd:pattern value="\d{3}-\d{3}-\d{4}"/>
<xsd:pattern value="\d{3}\.\d{3}\.\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="StateType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CT"/>
<xsd:enumeration value="MA"/>
<xsd:enumeration value="NY"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>Using Your Schema
Before you can use global elements from a schema in a form, you must upload the schema XSD file into one of your applications. To upload a schema:
1. From the Applications page, click the Edit icon underneath the name of the application with the forms that will use the schema.
2. Click Schemas from the left-hand menu
3. From the Schemas page, click the New icon
4. On the Upload Schema Page, type a meaningful name for your schema and provide a description. (These are optional but highly recommended.)
5. Click Browse, locate the schema XSD file or zipfile with multiple related XSDs on disk
6. If there are multiple global elements in the zipfile(s) specify exact name (relative to the top level directory separated by the '/' character of the XSD file containing the root schema.
7. Click Upload.
If your schema is valid, its name now will appear on the Schemas page. If you tried to upload an invalid schema, will not allow the upload and display an error message.
Important notes about uploading schemas:
You may add as many schemas as you require
You may use global elements from uploaded schemas in any and all forms in the application
If you want to use the same schema elements in multiple applications, upload the schema to each application separately.
If your schema references another schema, you must upload all related schemas in a single zipfile
If you upload a zipfile all the schemas in the zipfile must be related.
If you have unrelated schemas you must upload them individually or alone in their own zipfile.
Adding Elements to a Form’s Data Sources
Once you’ve uploaded your schema, the next step is to choose the global elements you want for a particular form. The elements you choose will be displayed in the form’s Data Sources area on the lower left portion of the Forms Designer. You may add the elements to as many forms as you wish, but you must work with one form at a time.
To add the elements to a form’s Data Sources:
Open the form in the Forms Designer (by clicking the form name from the Forms Page).
In the Data Sources area on the left side of the Forms Designer, click New from XSD
icon.
You’ll see all available schemas; click the plus sign
to expand the schema folders and display the global elements from each.
Click the
icon next to each global element you want. If the element is a complex type, you will see the parent element only, but the child elements will be added automatically to your form’s Data Sources. You may add as many elements as you like.
After you close the page, you’ll see in the Data Sources area each element you chose. (We added the Address Book and Policy Information global elements in this example.) For each element you added to your form’s Data Sources, will generate an XML instance document that you will see in the Submissions repository each time users submit your form, even if you do not end up generating a control from the element. Therefore, if you add an element to your form but later determine you don’t need to generate a control from it, make sure to delete the element from the form’s Data Sources.
Adding multiple data sources from the same namespace will cause a clash in your form. And in fact will assist you by preventing you from making this mistake. A warning message is displayed in the Add Data Source panel when you click plus.
Generating Controls from Schema Elements
Once the global elements are part of your form’s Data Sources you can generate controls for any or all of them. As shown below complex types are represented by a folder icon; simple types by a document icon.
To generate a group control that automatically includes controls for all of a parent element’s children, click the icon to the right of the complex type’s folder icon. The controls for the children elements will be inside a section control. If the complex type has repeating items, the section will be inside a repeat control.
To create individual controls for specific children of a complex type, click the icon to expand the complex type and click the icon next to each desired child element. For example, in the above example we could generate controls for First Name and Last Name but not for the phone number or email address.
You do not drag the elements from the Data Source tab into your form; instead when you click the icon the generated controls are automatically added to your form.
The controls are added above the currently selected control. The only exception is if the control is part of a repeating group and the currently selected control is not one in that group. must add controls in a repeating group to the same location on the form as the others from that same group. So it will ignore your selection.
You can then place the controls where you want by following the normal drag and drop rules, with one additional restriction: you cannot drag any control into or out of a repeat control generated from a schema element. (If you need to do this, you will have to edit the schema.) Rearranging the controls will not affect the structure of the form’s XML submission documents or how submission data is captured.
When a from palette form's XSD is imported as a Data Source into a new form, tab controls are lost .
Data and Display Types
Most controls generated from schema elements will appear initially as text controls. For example an xsd:integer type will appear as a text input control. However all validation for the controls will be based on the schema datatype. For example an xsd:integer type will only allow numeric values.
Schema elements that specify element restrictions will automatically be displayed as selection controls. It will display as a dropdown if there are four or more valid choices and a radio button if there are fewer than four valid values. You can change the display type between radio and dropdown and checkbox using the Display As property.
Xsd:boolean types will automatically be displayed as a boolean checkbox. If checked, the value will be 'true' and if unchecked it will be 'false' if the element is required and no value if optional. You can set the label of the true and false options via the Labels property. However only the 1st option which maps to the 'true' choice will be displayed. If you add more then 2 labels the extra labels will be auto removed. If you set only a single label a 2d label of 'false' will be auto added for you.
Show Controls from Data Source
To locate the controls on the designer canvas that come from one of the data sources added to the form, click the icon. This will highlight the associated controls.
Modifying Controls Generated from Schema Elements
There are two ways to modify controls that you generated from schema elements. You can:
Make changes to the controls in the Forms Designer
Make changes to the schema, and then update the schema in
by uploading the revised schema