Question themes and custom question views

Question themes and custom question views

What question themes are

Question themes are alternative renderings of a core question type. They change how a question looks and behaves in the survey — for example, an image-select variant of a multiple-choice question, or button-style single choice — without changing the underlying question type or your data.

Don't confuse them with survey themes: a survey theme styles the whole survey (colors, fonts, layout), while a question theme changes the rendering of one question type. Several entries in the question type picker — such as "List image select (Radio)", "Single choice buttons", or "Image select multiple choice" — are question themes presented as question types.

Choosing a theme for a question

A question theme is applied per question. Entries with "Show as question type" enabled appear directly in the question type picker when you add or change a question — you change an existing question's type from the Type dropdown in the Question settings panel, which opens the same picker.

Managing question themes (admin)

Managing question themes is a classic admin task in the Configuration menu: go to Configuration → Advanced → Themes, where question themes are listed alongside survey themes and admin themes.

This overview lists core question types, core question themes, and user (custom) question themes.

  • Visibility — themes are visible by default; switch one off and it disappears from the question type selector.
  • Install / uninstall — tick a theme, then use Selected themes → Uninstall. Uninstalled themes move to the "available" table and leave the selector. A theme cannot be uninstalled while any survey still uses it.
  • Import — upload a ZIP with the structure NAME/survey/questions/answer/QUESTIONTYPENAME/config.xml. The theme is installed automatically on import; themes built for LS3 are converted to the current standard. Broken themes (load errors, failed conversions) appear in a separate table with an error message.

Please note: if a custom or imported question theme is later uninstalled or becomes unavailable, questions using it may fall back to the default rendering for that question type.

Anatomy of a custom question theme

A question theme's config.xml defines:

  • Metadata — name, description, the question type it extends, selector group, sub-question/answer scales, HTML class.
  • Files — CSS/JS loaded via the asset manager.
  • General attributes — the predefined options on the right side of the question editor; you can show or hide them per theme but not add new ones.
  • Attributes — custom options (name, category tab, input type, default, help text) shown at the bottom of the question editor.
  • Engine — load options: load_core_css, load_core_js, show_as_question_type (list it in the type selector).

Note: current-format question themes are not backwards compatible with LS3.

Classic: custom question views (template view overrides)

In older installations, the same goal — overriding a question type's HTML — was achieved by letting a template overwrite core view files:

  1. In application/config/config.php, add 'allow_templates_to_overwrite_views' => 1 to the config array (disabled by default).
  2. In the template's config.xml, set overwrite_question_views to true.
  3. Copy only the files you want to change from application/views/survey/ into template/{your_template}/survey/, keeping the identical folder structure.

This mechanism was always documented as temporary; question themes are its replacement and should be used instead on current versions.