x

Main chapters

  1. Get started
  2. Workspace
  3. Editor
  4. Question types
  5. Share
  6. Results
  7. Configuration
  8. Installation and updates
  9. Profile and personal settings
  10. Account and billing
  11. FAQs
  12. Development
 Actions

Workarounds

From LimeSurvey Manual

The workaround pages of this manual collect solutions that users shared for older LimeSurvey versions. Most of them are JavaScript for the survey templates of that time. Today most of these tasks are built in as a setting or a question type. This page lists what to use instead, what still works with your own CSS or JavaScript, and where the old workaround pages are.

Built in now

What the workaround did What to use now
Add up answers or show a running total An Equation question with sum(). See ExpressionScript Engine - Quick start guide.
Make numbers add up to a total, for example 100 Minimum sum value and Maximum sum value of Multiple numerical input. See QS:Min num value and QS:Max num value.
Check answers with your own rule, for example a minimum length Question validation equation, for example strlen(Q002) >= 20. See Validation: make sure the answers you get are usable.
Limit the number of characters Maximum characters. See QS:Maximum chars.
Check the format of an email address, phone number or postal code Input validation with a regular expression. See QS:Preg validation.
Show only the options someone chose in an earlier question Array filter. See QS:Array filter.
Make "None of these" clear the other options Exclusive option. See QS:Exclusive option.
Show questions in random order Randomization group name. See QS:Random group.
Show question groups in random order Randomization group in the settings of the question group. See Question groups - introduction.
Pictures as answer options List image select (Radio) and Image select multiple choice
Answer options as buttons Single choice buttons and Multiple choice buttons
Sliders instead of number fields Use slider layout of Multiple numerical input and 5 point choice. See QS:Slider layout.
Limit the dates in the calendar Minimum date and Maximum date of Date/Time. See QS:Date min and QS:Date max.
Ask for a time Date/Time with a Date/time format that includes hours and minutes. See QS:Date time format.
Record how long participants spend on a page Save timings in the survey settings. See Notifications & data and Timing statistics.
Hide a question that only carries a value Always hide this question. See QS:Hidden.
Style one question CSS class(es) and your own CSS. See QS:CSS Class and Styling questions with CSS.
Totals in a grid of text fields Show grand total and Show totals for of Array (Texts). See QS:Show grand total and QS:Show totals.
Show a question or group only in some cases Conditions. See Setting conditions.
Put an earlier answer into a text Piping
Answer again in the same browser newtest=Y at the end of the survey link. See Share your survey link.
Let invited participants change their answers later Allow multiple responses with the same access code and Enable participant-based response persistence. See Participant settings.
Let someone translate a survey without other access The survey permission Quick translation. See Quick-translation and How permissions work.
Draw questions at random from a pool An Equation question with rand() and relevance equations. See Randomly ask a specific number of questions in a group.
Change a submitted response Edit the response, see Edit a response. To let the participant continue, also reset the Completed status of the participant, see Survey participants.
Register again with the same email address Built in: when an address registers again, LimeSurvey sends the link to the survey again. See Allow public registration.
Start the survey right after the public registration, without the email Not built in. A plugin can do it with the BeforeRegister event.
A page or document with all questions The printable survey or the queXML PDF export. See Export printable survey.
Add many answer options from a list Quick add: one option per line, the code and the text separated by a semicolon or tab. See Adding answers or subquestions.
Statistics for people without a login Public statistics. See Public statistics.
Get responses into other tools, or responses from an old survey into a new one The RemoteControl 2 API (for example export_responses), or Import responses.
Prefill many answers for each participant Participant attributes and default answers such as {TOKEN:ATTRIBUTE_1}. See Manage attributes and Default answers.
HTTPS for the administration Force HTTPS in Global settings ⇒ Security, for the whole survey site.
Your own JavaScript in the administration pages An admin theme with your own JavaScript file. See Custom Admin Themes.

Unless another place is named, the settings in the table are question settings:

  • In the new editor, select the question and use Question settings on the right. Many of these settings are only in the Advanced view.
  • In the classic editor, open the question and click Edit. The settings are in the panel on the right.

See Question settings.

Workarounds that became question themes

Some of the larger workarounds were turned into question themes by their authors, for example Card Sorting, Pricing Sliders (Van Westendorp) and the Implicit Association Test. They are community projects on GitHub, made for older LimeSurvey versions. See Question themes from the community. To try one, install its ZIP file with Upload & install on the Themes page and test it in the preview before you use it in a live survey. See Question themes.

Your own CSS and JavaScript

Workarounds that only change the look go into custom.css of your own theme. See Styling questions with CSS.

JavaScript still works, in a question text (edited as HTML) or in custom.js of your theme. The workarounds were written for the HTML of older templates, so class names and IDs are different today: check them in the preview with the Inspect function of your browser. In a question text, leave a space after every { and before every }. See JavaScript in questions, and for tested scripts JavaScript examples you can copy.

Not possible on LimeSurvey Cloud

On LimeSurvey Cloud, LimeSurvey runs the servers for you. Workarounds that change the server are not possible: edits to PHP files such as index.php or register.php, to the database, to .htaccess, php.ini or config.php, and to old template files (.pstpl, template.css, template.js). This rules out, for example, question pools in the database, a random order of all groups through index.php and skipping the email check at registration.

Workarounds that change server files

Some workarounds edit PHP files such as index.php or register.php, the database, or old template files (.pstpl, template.css, template.js). These files have changed or don't exist anymore, and an update overwrites your edits. Use a setting from the table above, or write a plugin instead. See Plugins - advanced.

The workaround pages

The workaround pages, by topic:

The workarounds are not official LimeSurvey extensions, but solutions that users created for themselves. LimeSurvey can't give support for them. If you have questions, contact the users who shared them.

For general problems, see the General FAQ and the Installation FAQ. If you can't find a solution, ask in the LimeSurvey forum. LimeSurvey Cloud customers can also contact support: see Get support.

FAQ

A workaround from the manual doesn't work. Why?

It was written for an older version: the files it changes don't exist anymore, or the HTML it looks for has changed. Use the built-in setting from the table, or adapt the code to your theme and test it in the preview.

Where do I put the CSS of a workaround?

In custom.css of your own theme. Core themes can't be edited, so extend Fruity TwentyThree first. See Core themes cannot be edited: extend them.

Can I show a random subset of questions to each participant?

Not with one setting. Use an Equation question with rand() to draw a number, and give each question a condition on that number. See ExpressionScript Engine - Quick start guide.

See also