Data Sources

This documentation is for Live Forms 9.1. v9.1 is a Cloud Only release. Not for you? Earlier documentation is available too.

COVID-19 Response Info: At frevvo, our top priorities have always been employees and customers. We have taken several steps to promote the well-being of our people, to minimize services disruptions, and to help where we can. Visit our website for updates.

Data Sources

allows you to generate forms automatically based on one or more pre-existing XML schemas. This enables you to quickly create forms that align with your databases, web services, BPM system, and key business applications.

For practical examples of this approach please refer to Creating a Form Connected to your Database.

In general,  can be created via two different methods:

  1. By dragging Palette Controls onto the form canvas
  2. By adding controls from a data source

It's very common and easy to create your form by dragging and dropping controls from ' control palette to the form canvas. As you do this automatically creates an XSD description of your form's controls. You can download this XSD from the Forms and Workflows Home Page. This method is typically used when your forms do not need to integrate with a back end system.

You can mix and match these two approaches of form creation. You can create all the controls in your form from XML schema elements. You can create all the controls in your form from the  palette. Or you can create part of the form from schema elements and part from palette controls that have no relation to the elements in your schema.

On this page: 

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

, you can use any and all global elements in the schema. If you want items from the schema that are not global elements, edit the schema and make the items global elements before uploading the schema to

At a high level, when you work with schemas you do the following:

  • Upload your schema to one of your

     projects

  • Choose the global elements you want and add them to your form’s Data Sources 

  • Generate form controls from the global elements you 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 by selecting
 Download Schema from the 
Action Menu on the Forms and Workflow Homepage. 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

 projects. To upload a schema:

  1. From the Projects page, click the name of the project with the forms that will use the schema.

  2. Click Schemas from the left-hand menu.

  3. From the Schemas page, click the 

    Add 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:

  1. You may add as many schemas as you require 

  2. You may use global elements from uploaded schemas in any and all forms in the project

  3. If you want to use the same schema elements in multiple projects, upload the schema to each project separately.   

  4. If your schema references another schema, you must upload all related schemas in a single zipfile

  5. If you upload a zipfile all the schemas in the zipfile must be related.

  6. 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:

  1. Open the form in the Forms Designer (by clicking the form name from the Form and Workflows Homepage).

  2. In the Data Sources area on the left side of the Forms Designer, click New from XSD

    icon.

  3. You’ll see all available schemas; click the plus sign

    to expand the schema folders and display the global elements from each.

  4. 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

Changes You Can Make in the Forms Designer

For controls generated from schema elements, you can make some but not all of the changes that you can for controls you drag in from the palette.  Here are the changes you can make in the Forms Designer:

  • Change the control Name — although this does not change the underlying XSD element name.

  • Create rules that rely on the controls. 

  • Set default value for the controls.

  • Rearrange the location of controls in your form. This includes moving sections into tabs or panels. As noted above, in addition to the normal drag and drop restrictions, you may not drag any control into or out of a repeat control generated from a schema element. 

  • Modify the control’s Display As property to change how the control looks on the form. The Display As property appears only for controls created from schema elements and appears instead of the Control Type property that you see for controls you have dragged in from the palette.   

  • Change the control’s label. You’ll see the new label name in the Submissions Repository Data Tab and in Excel if you download the submission results. However, the Submissions XML document for the schema will reflect the original element name.