Mugo Web main content.

New Matrix question type for eZ Survey

By: Xavier Cousin | March 10, 2011 | eZ Publish add-ons

eZ Survey is an eZ Publish extension that enables you to quickly and easily build surveys on a site. Its power is in its "ezsurvey" datatype, which enables editors to add different questions (of different question types) per object, without having to create separate content classes for each different survey. The Mugo Survey Addons extension adds a Matrix question type to the default question types available with eZ Survey.

The default eZ Survey question types are:

  • SectionHeader (simple header displayed on the survey - no user input)
  • Paragraph (paragraph of text displayed in the survey - no user input)
  • MultipleChoice (group of radio buttons or checkboxes)
  • TextEntry (text area that user can fill)
  • NumberEntry (text field where user can enter a number)
  • EmailEntry (text field where user can enter a email address)
  • RelatedObject (object relation to an object shown on the survey)

As documented in eZ Survey's ezsurvey.ini.append.php, it provides a framework for you to create new question types. You can use the Mugo Survey Addons extension as an example of how to do so. Time and resources permitting, we hope to add more question types to Mugo Survey Addons.

The Matrix question type that Mugo Survey Addons provides is a multi-dimensional version of the multiple choice question type, using radio buttons.

The edit interface for the Matrix question type supports any number of columns (as answers) and rows (as question dimensions):

On the public side, the matrix questions will appear similar to this screenshot:

Results of the Matrix question are aggregated in a table under the Administration Interface's Survey tab:

This extension should save you a lot of time if you are building surveys with a lot of questions that share the same answer structure!

Download Mugo Survey Addons (installation instructions are found in mugosurvey_addons/doc/readme.txt)