Question Themes

Question Themes

Introduction

Question themes can be used to customize existing question types and change their visual appearance. Question themes can only be built on core Question types.

To access the question themes, go to Configuration -> Advanced -> Themes -> Question themes.







Here you can see question types, core question themes, and user question themes.



Visibility

Question Themes are by default visible, but can be switched off. Once turned off, they will no longer be displayed inside the question type selector.

Configuration -> Themes -> Question Themes -> Visibility



The following screenshots of the question type selector shows the visibility of the Array 5-point question "On" (left) and "Off" (right)

QuestionThemes3.2Visibility.png

When the Option "Show as question type" is enabled, all question themes will also be displayed inside the question type selector.

Uninstall and available question themes

All available themes will be displayed in this section.

If you want to uninstall a question theme, you can do so by selecting the question Theme and choosing "Uninstall" inside the dropdown menu under the table. They will now appear inside the available Question Themes table.

If a theme is uninstalled, it will no longer be available inside the question type selector.

Steps to uninstall a question theme:
  1. Configuration -> Themes > Question themes
  2. Tick the box for the question theme that you would like to uninstall.
  3. Click  "Selected themes" at the bottom of the page and select "Uninstall" from the dropdown options.
Help.pngQuestion themes cannot be uninstalled if they are still used inside a survey.


Broken question themes

If there are errors while loading the available question themes, they will be displayed in this category with an error message.

Importing question theme

It is possible to import Question Themes using the import button. During the import, the theme will be automatically installed and available for use.

When a theme is imported from LS3 or above, it will be automatically converted into the current standard. The imported Theme must be in the ZIP format.
Before compressing the folder to zip, it must have the following structure:

NAME/survey/questions/answer/QUESTIONTYPENAME/config.xml

List of question types/IDs and default CSS classes


Configuration

The configuration of a question theme can be found inside config.xml.  An example can be found in the docs folder.

Metadata

The Metadata describes the question theme. These settings will also be saved in the database.


General attributes

General attributes are attributes that are displayed on the right side of the question editor.

These attributes are predefined and are the same for all Question Themes. Currently, no new ones can be added. If you want to show or hide certain options for a Question Theme, you can remove or add the attribute.

Attributes

Attributes are options you want to give to a Question Theme and can be customized. They are visible at the bottom of the question editor.

Engine

Configuration for special load options


Compatibility

Converting LS3 to LS4

When updating to LS4, the custom Question Themes will be updated to the LS4 standard. If the theme has missing attributes that cannot be automatically inserted, they will not be installed and instead be available for installation. If errors occur, they can be found under the broken question themes table.

If you want to import a Question Theme from LS3 into LS4 after upgrade, you can simply use the import function which automatically converts the LS3 theme to the LS4 standard.
The question themes created for LS4 are not backwards compatible (cannot be used in LS3!).

LS4 changes

The "custom_attributes" tag is no long needed. Attributes will always be defined inside the attributes tag instead. There is no need for different naming since they will be merged together when reading the Question Type.

Also, there have been additions to the metadata section of the XML. Additions are marked in red.


    • Related Articles

    • Overview - Themes

      Overview - Themes Themes are under the Advanced tab of Configuration: Configuration -> Advanced -> Themes LimeSurvey has an advanced theme and style functionality that provides developers a way to customize the appearance of surveys. Since LS3, the ...
    • Admin Themes

      Admin themes The Admin theme functionality allows you to customize the appearance of your LimeSurvey application. The survey admin themes settings are found under Configuration on the main navigation bar: Configuration -> Advanced -> Themes -> Admin ...
    • Custom Question Views (New in 3.0 )

      Custom question views (New in 3.0 ) Note: This is a temporary feature to be replaced in the future by question object (it will be very easy to move custom views to question object). It is disabled by default. As of version 2.5, you can create ...
    • The LimeSurvey Theme Editor

      The LimeSurvey theme editor The Theme editor is only available to users with the templates permission and to super-administrators. Attention: A theme that is not correctly constructed can cause a survey (that uses the respective template) to become ...
    • Creating a New Theme

      Creating a new theme To create a new theme (or edit an existing theme), you need template editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation. ...