Version 1.1

Administers a standard survey with knowledge of html document linked to from.

Description

Survey gathers comments on any number of pages using one standard survey or a unique survey for each page if you like. Designed to be inobtrusive, it knows the page a user referenced it from and will return them to that page once they submit the form.


Changes in this version


Todo


Notes

Since I am avoiding open ended input in my survey, allowing check boxes only, there are no checks for malicious input yet.

If you would like to modify this to work with your site start by running survey.pl and saving the form that it outputs for you.

survey.pl > survey.html

The names in the form are hard coded in survey.pl as is the form of course. Modify the form to your needs and make sure you don't break any variables in survey.pl. You will also have to work on the output format if you change the survey. It is modeled closely after the hard coded survey below.

This really isn't ready for general release, but you can make it work for you by modifying logSurvey. See oldLogSurvey for an example of how. If you want some help don't hesitate to ask. Drop me a line and I'll help you out.


Command Line Switches

None yet. May add some for report generating purposes.

User Configurable Variables

You may modify these variables to your heart's content.

$OUTFILE = "/home/stu/d/dbewley/www/sparcus/survey-out.html";
Where the output of the survey is written.

$SURVEY_FORM = "/sparcus/users/dbewley/www/survey.html";
Where is the survey? This will be the default survey. There is a hard coded survey included in the source to give an example. You can now map partial or full URLs to different surveys. See @SURVEY_MAP.

@SURVEY_MAP = (
"dbewley/perl|/sparcus/users/dbewley/www/survey.html", "dbewley/test|/sparcus/users/dbewley/www/survey.html", "dbewley/work/gone|/sparcus/users/dbewley/www/test-survey.html",
);

This array allows you to map different pages to different surveys. I'm trying to decide on a format that will be easy to configure for even a perl novice. Currently, entries are of the format

"partial URL|/path/to/survey/form.html",

The quotes and the comma is necessary. An entry should be continuous and not span lines! The URL is passed into a regex so make it SPECIFIC if you have similar URLs

I may add a third field that is the name of a perl script that you will write. The script would be 'required' in and used to write to output data in the format you need, which is probably unique to each survey.


Bewley Internet Solutions perl page