fcForms
-
fcForms is an external application that allows administrators to easily define and present form data that can be presented to different groups of users on the FirstClass system.
Each form can be exposed to a different set of groups, have its own unique set of input elements and can be posted to any container in the FirstClass directory.Developed by Stewart Lynch (slynch@createchsol.com)
Installing fcForms
-
To enable fcForms you must add the fcForms css to the custom.css file in the fcws directory
-
fcForms comes with some sample forms. The form presentation file needs to be modified.
See The Form Presentation File (forms.json) for more detail on the format of this file. -
fcForms is an external application that runs on an external web server. This can be FirstClass Internet Services or a completely different web server.
-
All the pieces are now in place to install the application and make it available to those groups of users specified in your form presentation file.
Creating Your Own Forms
-
You can create your own forms that can be presented to different groups of users on your system. This section describes the process that you can follow.
-
The form presentation file defines which forms are available to which groups of users along with the container to which the form will be submitted and a subject for that message.
This array of javascript object literals (often referred to as JSON objects) is assigned to the variable forms that is injected into the application as an array of javascript objects when executed. This "JSON" object is like a javascript object except that the key values are surrounded with double quotes and any string values must have double-quotes surrounding them. Each object refers to a single form.
Note: You can duplicate an object and change the "Allowed Groups" . "To" and "Subject" values to use a single form definition for a different group of users and have submissions posted to a different container. -
Each form definition file has the same structure and the format must be adhered to. Form names should be of the format formname.json and can be stored anywhere within the Forms folder structure. For organizational purposes, a MyForms folder is provided to storing your form definition files.
-
This section provides a sample javascript object literal (JSON Object) for each of the different supported field types.
Please review the Form Definition File section to review the entire structure for a form's complete definition. You can copy and paste individual field objects into your own formData.json file and modify the values to meet your needs. Key value pairs in red are optional. Items to be modified are in blue. All others are required. -
HTML5 introduced a number of new input field types and attributes. This section describes the field types that are supported by fcForms and documents different browser support.
-
In addition to new field types, HTML5 input fields include a number of new field attributes. This section describes which attributes are supported by fcForms and by which browsers.
All of these attributes are optional but can be combined for each of your different applicable field types. -
The styles.css file contains all of the styles that are used to present your form. It uses these styles as well to embed them in the message that is sent to your FirstClass container. You can modify these styles to better match your organizations color scheme.