This guide gives you a step-by-step approach to create a questionnaire and put it on LU’s server. I’m very, very new to this game, so I can’t guarantee everything in this guide is technically correct, but it seems to work for me. A great deal of assistance was given by Brian O’Connor and Chris Mushquash, with Garret Kafka being the first test subject to get these instructions into an understandable format. Please let me know if you can think of improvements, or if I have any inaccuracies. Also, I created these instructions for FrontPage in Microsoft Office 2000. New versions or older versions of that program may have different instructions.
Good luck!
David Armstrong
Making Your Questions
Open Microsoft FrontPage
From the menu, select - File….New….Page
Select “Form Page Wizard”
Click Next, see this screen
Click “Add” to add your questions
Next, you’re asked what kinds of questions you want to ask. You have a few choices here….
- For a question in which you endorse one out of several options (multiple choice), click “One of several options”
- For a question in which they can endorse as many options as they wish (please select which of the following symptoms you have experienced in the last 2 weeks), click “any of several options”. Please note that this will create a variable for each option you enter. It will be referred to in the HTML as the variable name followed by the name of the item. Therefore, if you have 7 options for this questionnaire, you will have 7 variables.
- For a fill in the blank, pick “string”
- For a long fill in the blank, pick “paragraph”
At the bottom, enter the question portion of the question. The answers you will add later. Press “Next”
The following example is for ‘one of several’ or multiple choice format
You will see the following screen. Type in your answers (for this one, the person can choose between never, moderately and sometimes), each on a different line. Also, prescribe a SHORT name for your question, alpha-numeric only, NO SYMBOLS (for your own sanity, as simple as possible!). Keep these variable names in another file somewhere for easy access. For each page, make a list followed like commas (no spaces):
ID,age,sex,NEO1,NEO2,BDI1,BDI2
This will save a lot of work later. Make sure your list is accurate to what you have entered – that includes watching what is capitalized and what is not.
Next, choose how your answers will be displayed. You can have a drop down menu like this (probably best, given space constraints):
If choosing a drop down menu, it might be wise to include “Please choose one” at the top of the available options, letting your participants know they missed a question, and letting you know what questions weren’t even attempted instead of just not endorsed.
Radio buttons look like this:
After selecting how they will be presented, you then want to ascribe a name for your variable. Press “Next”
Continue the process of ‘Adding’ questions as previously mentioned until you have as many on that page as you want. Then click “Next”
You then specify how you want your questions presented:
Normal paragraphs are like the examples given previously. Numbered lists assigns numbers to each question (may not be desirable if multiple questionnaires are on the same web-page.
Click ‘No’ for Table of Contents, and leave ‘Use Tables to Align Form Fields’ checked. Click ‘Next’
You will see this screen next:
Change this option to read “Use custom CGI script”. Press Next, then Finish. Save your work. Repeat this process for the other pages you want to make.
Making your pages look pretty.
Put a common colour scheme, and instructions to your questionnaires:
Next, left click on the ‘Submit’ button to make it bigger by adding more words. Click ‘Form Field Properties’
Where it says ‘Value/Label’, type what you want the button to say and ‘OK’
Next, create a hyperlink to the next page by typing something similar to “Please click here to continue” in between the Submit Form and Clear Form buttons. Highlight it, and right click. Select “Hyperlink…”
Next, type the address you want the page to point to where it says URL. It begins with “ then the address of your hosting account “flash.lakeheadu.ca/” then the name of your account “~gjkafka/”, then the name of your questionnaire as it is saved on your computer “Health questionnaire.htm”. Click “OK”. If you want the hyperlink to point to a page you have already created, you can just click on this page in the window above the URL.
You also need to upload a file called bnbform.cgi, available on this website, into your public_html folder. Also check for the file. To ‘set the permissions’, once you upload the bnbform.cgi file, right click on it. LeechFTP says ‘set attributes’, other FTP programs may say permissions. Click on this, and where it says ‘numeric’ (in LeechFTP), enter the number “755”. This means that the owner can read-write-execute, group can read-execute, and others can read-execute.
The .bout files are where your data will be stored.
Change your HTML
In FrontPage, click the tab at the bottom of the Page that says HTML. This is where the computer code for your webpage is. Next, scroll down to (it’s near the top):
<FORM METHOD="POST" ACTION=".../custom.cgi"
and change it to:
<FORM METHOD="POST" ACTION="bnbform.cgi"
Then, scroll down to the end of the code after the ‘submit’ button. It will probably look something like this:
<INPUT TYPE=submit VALUE="All Done, Submit My Answers!"</p>
Next, you want to insert the following code (here, called the SCRIPT CONFIGURATION SECTION)….Just cut and paste it, we’ll worry about changing it later.
<!-- SCRIPT CONFIGURATION SECTION -->
<INPUT TYPE="HIDDEN" NAME="required"
VALUE=""
<INPUT TYPE="HIDDEN" NAME="data_order"
VALUE="variables go here"
<INPUT TYPE="HIDDEN" NAME="submit_to" VALUE="email address goes here"
<INPUT TYPE="HIDDEN" NAME="automessage" VALUE="mymessage"
<INPUT TYPE="HIDDEN" NAME="outputfile" VALUE="/home/dcarmstr/section1"
<INPUT TYPE="HIDDEN" NAME="countfile" VALUE="form1"
<INPUT TYPE="HIDDEN" NAME="emailfile" VALUE="form1"
<INPUT TYPE="HIDDEN" NAME="form_id" VALUE="section 1 response"
<INPUT TYPE="HIDDEN" NAME="ok_url" VALUE=""
<INPUT TYPE="HIDDEN" NAME="not_ok_url" VALUE=""
<!-- END OF SCRIPT CONFIGURATION SECTION -->
Now we’ll change everything in red italics.
First, take that list of variables you made and faithfully set aside. Copy it over the part that says variables go here, keeping within the quotation marks.
Next, you probably want back up copies of all data sent to an email address that has a large memory capacity (like Lakehead, or the new yahoo accounts). Type your email address as it would appear in the address field of an email where it says email address goes here. If sent to multiple accounts, make sure you separate them with a comma, no space.
Next, type the name of the file you will create (the .bout file) that the responses will be stored in. (here, named section1, must follow /home/username/)
Next, type the header of the email for which you would like your responses to be placed (here, named section 1 response)
Next, type the name of the hyperlink you want your participants directed to when they submit this questionnaire (probably the next page of your questionnaire).
Then, change all of the subsequent ‘VALUE’ statements to line up with your separate form names.
See the “readme” file at for a more in depth discussion about what these instructions are sopposed to do.
Creating .bout files
Remember when we said we were going to create a .bout file. Just open notepad and ‘Save As’ blank files. Use the name you specified in your CGI script. Type “insertnamehere.bout” and save it. Do this for each questionnaire. You will be saving this on a secure part of the web, so pay attention to the special .bout/permissions uploading procedure in the next section.
Uploading your pages
To put the questionnaire on the web, you will need an FTP (File Transfer Program) program (e.g. CuteFTP, LeechFTP). These are easily ‘findable’ and ‘downloadable’ from the web (just google it). You will also need to verify that your account is running – at Lakehead, you need to go to the computer help desk to activate your flash account. When the account is up and running, open up the FTP program. They’re all pretty much the same. You will want to connect up to your flash account next – click ‘File’ and ‘Connect…’ Before doing so, I have to turn off any firewall or ambitious virus detection software I’m running (you would know if you have that on your computer).
Where it says ‘Host or URL’, type the name of your hosting account (e.g. flash.lakeheadu.ca). Username is the name your specific account is under (e.g. dcarmstr, as in the address). Password is the word you specified when creating your account. Press OK, and you should start to see a whole series of commands telling you that you are successfully connected.
Now, the section at the top full of green and blue text is telling you what is going on. Look down at the very bottom of the window…mine says C:\Program Files\.... The section directly above that is a listing of files on your computer. Look down again, right beside it (to the right of the screen). Mine says /home/dcarmstr/. This section tells you what is on your webspace (mine has a bunch of files right now).
The easiest way to upload your whole ‘web’ of files is to navigate the screen on the left hand side (your computer) so that you see the folder containing all your files. Click and drag this over to the right hand screen (you’ll have to click on that screen then and select refresh to see your folder). Then right click on this folder, and rename it to public_html Otherwise, you’ll have to create this folder anyways and put the files in there one by one.
Then, get out of public_html folder by clicking the little up arrow at the top of the web window (/home/dcarmstr/). Then, upload your .bout files here. Nest we need to change the pemissions on the .bout files. Right click on your bout file, click ‘set attributes’, and change the number to 622. If that doesn’t work, try 777. If that doesn’t work, give me a call.