Introduction
The Parity Forms Engine (PFE) is a custom application that can display forms in a web browser so that they can be incorporated into clients’ web sites. There are existing e-form applications like InfoPath and Achieve Forms but the PFE offers greater functionality and the rendered forms conform to the WAI AAA accessibility standards.
The PFE has been designed to be extensible and scalable to support hundreds of forms and thousands of form instances. Forms can be incorporated into existing ASP.NET web sites and provide full support for multi-page forms with Next / Previous navigation.
Web Controls
Since the forms are rendered as HTML, the PFE needs to have a rich collection of web controls. The PFE supports over 35 web controls some of which that can be configured to alter their appearance. The example below shows four different views of the same control.
Data validation can also be supplied to certain controls and there is support for the following:
· Where data input is mandatory
· Where two controls are compared (e.g. where a password confirmation is needed)
· Where the data input must conform to a pattern or mask (e.g. postcode or email address)
Forms also need to be interactive. That is they need to be able to hide or show controls based on user input or selection. PFE supports the ability to hide or display individual controls, groups of controls or entire sections based upon one or more conditions.
Sections can be used to build multi-page forms and as you might expect you can navigate between sections using Next / Previous buttons.
The ability to embed one form inside another is potentially the most powerful feature of the PFE. By creating re-usable sub-forms, a new form can be assembled very quickly by incorporating these sub forms into the main form.
There is support too for tables where rows can be added or removed as required as shown in the example below.
Forms
The two main aspects of a form are the form definition and the form instance.
Form Definition
The Form Definition defines the layout of the form. A form has an underlying data model which is used to store the data entered by the user. A form can have one or more views and when a form is opened the default view can be specified. Views are often used when a workflow is attached to a form. For example an expense approval form might have two views. The first view allows the user to add expenses and submit the form to an approver. When the approver opens the form they see the second view where the expenses are displayed but allow the approver to approve or reject.
A key feature of the PFE is the ability to generate a PDF view of the form. The PDF can either be a blank form for the user to complete off-line or a copy of the form containing the data entered by the user when on-line (particularly useful where a signed copy of the form is required).
Form Instances
When a user completes a form on-line and submits it, it is saved as a form instance. The form instance stores the data that was entered and has a reference to the original form definition so a completed form can be viewed.
Architecture
The architecture is shown in the diagram below:
Storage
To store the form definitions and form instances a provider model has been used. There are two providers with the existing PFE version: a file store repository and a SQL Server 2005 store. During installation the PFE is configured to support whichever store is appropriate. Additional providers can be built to support other repositories (e.g. Oracle).
Web Service (WCF)
Access to the forms repository is through a data layer which abstracts the data provider being used. The data layer is in turn accessed through a Windows Communication Foundation web service. This means that form definitions and form instances can be held in a secure repository behind a firewall and access to it can be via the WCF web service.
WCF Client
The WCF client provides access to the WCF web service when opening forms in the browser and when designing forms in the PFE Designer.
Designer
The PFE designer is a rich client application used to design forms. It allows forms to be created quickly by dragging and dropping controls onto a view. Similarly the form data model can be quickly created. The Designer generates the underlying XML for the form definition so the user does not need to edit the XML manually.
Summary
Most web sites have an e-forms requirement so there is a great deal of opportunity to realise the investment made with the PFE.