University of York

Online Questionnaire System

So, you want conduct a questionnaire on the web? And you are a member of staff? This document explains how you can go about doing so.

What you need

First of all, you will need the ability to create web pages containing HTML forms (or know someone who does).

You will then need to create two web pages

  1. One containing a questionnaire
  2. One to display to the user after they've completed your questionnaire

What this system can do

This system is fairly simple. Essentially, it will collect responses to your questionnaire, and present you with a spreadsheet of results. The spreadsheet will contain a column for every question in the questionnaire, and each row will be one respondent's answers.

What this system can't do

The system does not know who the respondents are, therefore multiple submissions by one person are possible. There is a mechanism to work around this: You ask a question in your questionnaire that requires a unique answer (such as an email address) and tell this system about that question. It will then require that no two submissions contain the same answer for this question.

Can you restrict the group of people who can respond?

Yes. You can restrict the set of people who can view your questionnaire (and hence the people who can respond to it) by using the Access Control Tool (Yorkweb accounts holders only)

How long will the system keep my responses for?

The system will hold responses for 6 months. In other words, once somebody responds to your survey, that response will be deleted 6 months later. Therefore, it is advised that you download and save a copy of your survey's results before responses start getting deleted.

A bit more detail

A few words on the markup of your questionnaire

How you layout the HTML of your questionnaire is mostly up to you. However, the form field names must:

so no commas, spaces, hyphens, tildes, quotes, ampersands etc. in form field names. For example:

<input name="question1"...> is fine

<input name="1question"...> is bad because the name starts with a number

<input name="question-one"...> is bad because the name contains a non-alphanumeric character (a hyphen in this case)

The other requirements are

  1. your questionnaire's HTML form submits to the following URL (a unique id will be generate when you register your questionnaire with the system):

    https://www.york.ac.uk/systems/questionnaire/handle_feedback.cfm?questionnaire=<a unique id>
  2. your questionnaire's HTML form uses method="post"
  3. your questionnaire's HTML form has unique name attributes for all input, textarea and select tags
  4. your questionnaire's HTML form either doesn't specify an enctype attribute, or it specifies one of the following enctypes:
  5. The system will ignore form fields with any of the following names (because they are the field names of the Yorkweb search form):
  6. Your questionnaire's HTML form must state the type of each input field (text, radio, checkbox or hidden) for which you want the system to collect answers. It will ignore all other input types or any inputs with no type specified

A couple of recommendations:

  1. Make the names of your HTML form fields very meaningful. If that's not possible, then all <input>, <select> and <textarea> tags in your HTML form ought to have a "title" attribute that contains the text of the question being asked.

    For example, if you are asking a question about what the respondent's favourite fruit is, it would be good if your HTML form input looked like this:
    <input type="checkbox" name="fav" value="banana" title="What is your favourite fruit?">
  2. Make the values of your HTML form fields very meaningful. If that's not possible, then all <input> tags of type checkbox and radio ought to have an id attribute that references a <label> tag. That label tag should contain the text of the answer corresponding to the checkbox/radio button.

    For example, if you are asking a question with multiple checkboxes, each with reasonably wordy answers, you could make it look like this:
    <input type="checkbox" name="views" value="opt1" title="What are your views?" id="q2"> <label for="q2">I think we should all just give up</label>

Testing the system

Before you let your questionnaire loose on your audience, you may want to test this system by filling out your own questionnaire a couple of times, looking at the results and seeing that everything is in working order. To do this:

A few words on URLs

When you set up a questionnaire using this system, it will ask you to enter the URL of your questionnaire. It is important to note that the URL you register with this system must be same URL that you advertise to your respondents.

Sometimes two URLs point to the same physical file. For example, http://www.york.ac.uk/depts/flowergrowing/questionnaire.html might be the exact same file as http://flowers.york.ac.uk/questionnaire.html. If you register the former URL with this system, then only responses coming from the former URL will submit successfully. Responses from the latter URL would receive a message about the URL not being registered with the system.

Editing your questionnaire after you have registered it

Life is simplest if you don't register your questionnaire with this system until you are completely happy with it. If you edit your questionnaire after you have registered it with this system (other than to modify the <form action=...> line) then you must delete your questionnaire from the system and re-register it. This is because the registration process builds a database structure based on the structure of your questionnaire. If you edit the questionnaire after registering it, then it may not be in sync with the system's database structure, and respondents may not be able to submit their answers.

To get started

Go to https://www.york.ac.uk/systems/questionnaire/admin/index.cfm