Workarounds from the manual: what to use instead | LimeSurvey

Workarounds from the manual: what to use instead

About the workarounds in the manual

The LimeSurvey manual has four pages of workarounds: solutions that users shared for LimeSurvey 1.x to 3.x, most of them JavaScript for the survey templates of that time. Today most of them 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 what can't be done on LimeSurvey Cloud.

Built in now

What the workaround did What to use now
Add up answers or show a running total An Equation question with sum()
Make numbers add up to a total, for example 100 Minimum sum value and Maximum sum value of Multiple numerical input
Check answers with your own rule, for example a minimum length Question validation equation, for example strlen(Q002) >= 20. See Validation
Limit the number of characters Max characters
Check the format of an email address, phone number or postal code Input validation with a regular expression
Show only the options someone chose in an earlier question Array filter (Advanced > Logic)
Make "None of these" clear the other options Exclusive option (Advanced > Logic)
Show questions in random order Randomization group name (Advanced > Logic)
Show question groups in random order Randomization group in Group settings. See Add and edit a question group
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
Limit the dates in the calendar Minimum date and Maximum date of Date/time
Ask for a time Date/time with a Date/time format that includes hours and minutes
Record how long participants spend on a page Save timings. See Timing statistics
Hide a question that only carries a value Always hide this question (Advanced > Display)
Style one question CSS class(es) (Advanced > Display) and your own CSS. See Style questions with CSS
Totals in a grid of text fields Show grand total and Show totals for of Array (Texts)
Show a question or group only in some cases Conditions
Put an earlier answer into a text Piping
Answer again in the same browser newtest=Y at the end of the 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

Every setting in the table is in Question settings when you select a question, unless another place is named. See Question settings.

Workarounds that became question themes

Some of the larger workarounds were turned into question themes by their author, for example Card Sorting, Pricing Sliders (Van Westendorp) and the Implicit Association Test. They are community projects on GitHub, made for LimeSurvey 3.x and 4.x. 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 Use a question theme.

Your own CSS and JavaScript

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

JavaScript still works, in a question text with Edit 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 Add JavaScript to your survey, 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 the template files of LimeSurvey 1.x and 2.x (.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.

Next steps

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 Create your own theme in the theme editor.

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: quick start.