Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 3.07 KB

How-to-create-an-email-questionnaire.md

File metadata and controls

27 lines (22 loc) · 3.07 KB

EmailQuestionnaire: How to Create an Email-Questionnaire

1) Create an HTML form

EmailQuestionnaire employs simple HTML forms and you are expected to input them by hand. The forms are made of the following ingredient:

  • a form element surrounding it all. This one should have the attributes method="GET" and action="http://server/EmailQuestionnaire/receive/pollName" where server is your server's host-name and pollName the questionnaire's name.
  • inside there, input elements which can be of type text or radio... also textarea and button elements. Each of them should have a unique name attribute which is used as column-name in the result table The simplest form you can use is as follows: text:

This form presents a single text field and its submissions will be made with the column name text. The "GET" method is necessary because email-programme can only communicate to web-browsers using the open-url command and not with a submission of values. This limits somewhat the size of the response in the form that you can let the users input (about 5000 characters nowadays).

Each time you have a form that is somewhat in a good state, you should preview it in the browser and also try to copy it into a mail and send it.

2) Pack into a mail

Contemporary email-programmes all handle HTML mails end to end with a security model and rendering capabilities that are slightly different than those of a web-browser. An EmailQuestionnaire is best edited by hand (or with Kompozer or others) then previewed and tested in the browser, then copy and pasted to the corresponding mail application where you send the questionnaire the intended recipients. You should copy the complete from start to end of the form element. To preserve the HTML nature, and avoid translations such as going through RTF, I recommend that you match the browser environment and email programme: Firefox -> Thunderbird (or Postbox), Safari -> Apple Mail, Chrome -> GMail. You should try to send it to yourself to check whether your mail programme supports displaying forms and how it gets changed in appearance. Opening the mail on a mobile phone, for example, can bring quite many surprises.

3) Create the questionnaire

The file web.xml which was adjusted at the installation process has indicted a directory of XML files. Inside there, each questionnaire, identified by the name above, will store its responses within the directory of its name. This way, administrators of the web-application can allow only the submission of named questionnaires. This tiny security measure can avoid that systematic spamming occurs on EmailQuestionnaire server instances since the questionnaire names are local to each installation.

Try to submit a questionnaire, you should see a page such as Thank you displayed after the submission has been made. An XML file should be created in the directory of the questionnaire. You are now ready to process the results.