Pre-filling a text field at Limesurvey 1.92 using default answers and Expression Manager

At Limesurvey 1.92 we implemented default values for several question types that were missing this feature. In combination with the new and powerful Expression Manager, this offers new possibilities. Using the Expression Manager at Limesurvey 1.92 you can now easily populate a text field with data from previous answers.

Let’s create a simple example for demonstrating how it works:

1. Create a text question at Limesurvey and note the question code:
2. Create a second question of the same type and e.g. ask for the email or last name. Again, note the question code

3. At a third text question, where you want to pre-populate the text field with the previously entered texts, click the “Edit default answers for this question” icon:
Limesurvey edit default answers icon



4. At the field to enter a default value, add the question codes in {…} brackets:



5. If you then fill in text for the first two questions, the answers should be inserted at the question for which you defined the default value.


Things to watch out for:

  • The question for which you set the default answer has to be shown on a following page.
  • When setting a default value use {…} brackets when referring to a question code of a previous question.

More Information:


How to add your own favicon at a Limesurvey template

A favicon is the little icon you see in the browser’s address bar, list of bookmarks or tab. You can display your own icon as follows:

  1. Create a favicon – google will find you lots of free favicon generators
  2. Name your new favicon “favicon.ico” and place it in your template directory. This can easily be done by using the template editor’s upload feature.
  3. Add the following code to your startpage.pstpl before the closing </head> tag:
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" type="image/x-icon">
<link rel="icon" href="{TEMPLATEURL}favicon.ico" type="image/x-icon">

How to restore data from a deactivated Limesurvey survey

You might run into problems if you deactivate your survey at Limesurvey instead of setting an expiry date (which we recommend to restrict access to a survey), because once a survey is deactivated, a backup of the results table “lime_survey_12345” (12345 refers to the survey ID) is created and it is renamed to “lime_old_survey_12345_20120101235959”. The last part of the table name marks the date (2012-01-01) and time (23:59:59) the survey was deactivated.

If you now want to view results, generate statistics or export the response data, you have a problem: Limesurvey doesn’t show any available data because the response table was backed up and renamed.

To get access to the results, proceed as follows:

  1. Activate the affected survey again.
  2. Go to the “Responses & statistics” screen.
  3. Click at the “Import responses from a deactivated survey table” button (see screenshot below).
  4. Choose your source table.
  5. Click the “Import responses” button.

This is how it looks like at the Limesurvey 3.x interface:

Re-import responses from deactivated survey
Re-import responses from a deactivated survey at Limesurvey 3.x


And at the older Limesurvey v2.0x versions the option looks like this:

Import answers from a deactivated survey table
Import answers from a deactivated survey table at Limesurvey v2.0x

How to conditionally hide/show groups in Limesurvey

When first working with Limesurvey’s condition designer, you might miss a feature to show/hide whole question groups. Doing this is quite obvious though:

  1. Set a condition on the first question of the group like “Show question X if question Y was answered ‘>=3’ “.
  2. Click the “copy conditions” icon at the condition editor.
  3. Select the previously set condition on top and at the list of following questions select all questions of the according group:

    Show/Hide groups at Limesurvey by using conditions
    Show/Hide groups at Limesurvey by using conditions
  4. Click the “copy conditions” button
  5. Done 🙂

Note: At Limesurvey 1.92 you can use the Expression Manager for hiding groups.