|
Forms - Capturing the Data
Using forms to capture data from others can assist in
the timely collection of data. However, if the collection involves a lot
of data, getting the data into a format that can be useful can be
time-consuming and overwhelming. With the use of optional hidden form
fields, the data can be captured to a data file as the user completes the
form.
Prior
to capturing the data, two steps need to be completed.
Once the data file is created,
you can proceed with the following:
Establishing
a Share for Collecting the Data
The file that will hold your data must be
located on a special forms data directory (share). If you do not already
have access to a data share, you must establish one.
- Send an email message to
web@uwec.edu
- Include the following:
- Your name
- Web Publishing Account Name
- Names of those needing access
- Email addresses of those needing access
You will receive a confirmation email message when the
forms data directory has been created that will tell you the name of the
share you need to map to and the directory name to use so you can create
the initial file and retrieve its data.
Establishing
the File for the Data
The file that will be used to capture the data does not
need to contain any data but the "shell" of the file must be created. When
users complete the form, the data is appended to the end of the file.
- Map to the location of your forms data share
For information on mapping a drive, see
Connecting to Network Drives.
- Using Windows Explorer, from the Folders
list, select your forms datashare
- In the Contents list, right click » select
New » Text
Document
- In the Name field, type the document name
NOTE
The filename should not include spaces.
- Press [Enter]
Fields
for Capturing Results to a Data File
The following table illustrates the field names and
values used to store form results to a data file. This data file can then
be read into a Microsoft Word table, a Microsoft Excel spreadsheet, or
even a Microsoft Access Database. We strongly recommend that anyone
wishing to use these options be familiar with importing files with
delimiting characters.
| Field Name |
Value |
| append_db |
If you wish to append the form fields
to a text file, the value should specify the path and file to hold the
data.
Format: directoryname/filename.txt (note that the -f of
your share name is not
included in the directory name)
Example: doc/data.txt
NOTES:
The initial blank data file must be created on the server prior to
using the script. The script does not automatically create it; it only
appends to it.
If you plan on using Microsoft Word to view the data
file, we recommend you use a '.dat' for your file extension instead of
'.txt'. |
| db_fields |
Specify exactly which fields are
appended to the text file (e.g., realname,email,phone).
Format: fieldname,fieldname,fieldname
Example: realname,email,phone
NOTES: Any
field not specified in db_fields will not be appended to the
file. Date and time fields are also automatically inserted in front of
the rest of the fields in each record. Field names are case sensitive. |
| db_delimiter |
This is the separator character used
between fields in the text file. Avoid using common characters, like
":", "@", or "/". We recommend using characters that are less likely
to be entered in by users ( e.g., % ^ ; | ). You could also use the
tab key as the delimiter. To use the tab key just put the cursor
between the quotation marks in the value field and press the [Tab]
key.
NOTE:
If you use the tab delimiter, your file extension should be '.tab'
instead of '.txt' or '.dat'. |
Inserting
the Optional Hidden Form Fields
- Open the file that contains your form or
create your form
- Place your cursor within the form boundary where you
would like to insert the hidden form field
- From the Insert menu, select
Form Objects » Hidden Field
OR
From the Forms tab on the Insert bar, click
HIDDEN FIELD

The hidden field will appear.
- Select the hidden field by clicking it once

The Hidden Field properties pane appears.
- In the HiddenField text box, type the name
of the field
For a listing of field names and values, refer to
Fields for Capturing Results to a Data File.
- In the Value text box, type the value of the
field
For a listing of field names and values, refer to
Fields for Capturing Results to a Data File.
- Repeat steps 2-6 until you have entered all the
needed hidden form fields.
|