[Mediawiki-l] Survey? Forms, writing to the DB, emailing results, etc

Rob Church robchur at gmail.com
Sun Aug 12 08:30:13 UTC 2007

On 12/08/07, Sean O'Connor <sean at transabled.org> wrote:
> Here's what I need to do:  I want my users to answer a survey.  Once
> they fill out the survey, they submit it.  The information from the
> survey gets entered in a dedicated table in the database, and an email
> gets sent to the Wiki's admin email, with the information from the
> survey form.  I don't need the answers to be compiled and displayed on
> the site, as that will be done manually at the end of the survey,
> exporting to CSV, then playing with a spreadsheet.

I'll assume it has to be integrated with MediaWiki in some fashion,
although this brings the convenience of not needing to roll database
code, etc. for an external script.

Write a simple special page extension which presents the user with the
form, validates and saves the responses, sends the email notification,
and perhaps even dumps the CSV values for authorised users.

There are sufficient examples of special page extensions in Subversion
to do this. I'd suggest taking a look at things like NewUserNotif for
examples of harnessing MediaWiki to send the emails; extensions such
as Vote or other things that do simple database manipulation will be
useful for that, and most special page extensions will provide solid
examples of building and presenting forms to the user, and handling
their input.

Rob Church

More information about the MediaWiki-l mailing list