Check out the LimeSurvey source code on GitHub!

Question type: Array by column

6 years 2 months ago #50925 by kh1
I have a specific question type I need to create, and have tried all of the question types available, but none fit the format I need.

I essentially need the basic 10 point array, but I need to divide the numbers by column (D-A). The number 1 would be in column D (which would have a description), 2,3,and 4 in C, etc.

not done better good long text description

1. Goals met? 1 2 3 4 5 6 7 8 9 10

I am replicating a previous survey, so I need the structure to remain the same.

Any suggestions would be greatly appreciated.


File Attachment:

File Name: limesurvey...1019.doc
File Size:130 KB

Please Log in to join the conversation.

6 years 2 months ago #50926 by holch

This previous survey wasn't done with Limesurvey, correct?

I don't see a chance to do this with the standard features of Limesurvey. Maybe Tpartner finds a solution via Javascript.

Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

6 years 2 months ago #50934 by Mazi
This can only be done by changing the question styles by using some specific Javascript.
User "tpartner" is our JS expert, he also offers advanced, paid support if this is a must have feature you need.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)'"

Please Log in to join the conversation.

6 years 2 months ago - 6 years 2 months ago #51101 by tpartner
This isn't too difficult.

Set up your survey to use JavaScript and place the following script in the source of your array-10-point question. Replace "QQ" (line 5) with the ID of the array-10-point and modify the text in line 7 as required.

The script will insert a new row above the headers and apply some classes to elements so we can style them with CSS.
<script type="text/javascript" charset="utf-8">
        var qID = QQ;
        var newRow = '<tr><td>Characteristic</td><td><u>D</u><br /><br />...does not occur</td><td colspan="3"><u>C</u><br /><br />...occurs...</td><td colspan="3"><u>B</u><br /><br />...plan is...</td><td colspan="3"><u>A (= all of B plus these)</u><br /><br /> documented...</td></tr>';
        $('#question'+qID+' table.question thead').prepend(newRow);
        $('#question'+qID+' table.question thead tr:eq(0)').addClass('arrHeaders');
        $('#question'+qID+' table.question thead tr:eq(1)').addClass('arrSubHeaders');
        $('#question'+qID+' table.question tr.arrHeaders td:eq(0)').addClass('firstCell');
        $('#question'+qID+' table.question tr.arrSubHeaders th:eq(0)').addClass('firstCell');
Then add the following to the end of template.css and modify as required:
.modifiedArray table.question {
    border-spacing: 0;
    border-collapse: collapse;
.modifiedArray table.question th,
.modifiedArray table.question td {
    border: 1px solid #999999;
.arrHeaders th,
.arrHeaders td {
    text-align: center;
    color: #000000;
.modifiedArray table.question .arrHeaders .firstCell {
    border-bottom: 0 none;
.modifiedArray table.question .arrSubHeaders .firstCell {
    border-top: 0 none;
The result should be:

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 6 years 2 months ago by tpartner.

Please Log in to join the conversation.

6 years 2 months ago #51134 by kh1
Many thanks! I'll give that a try

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form