Hi,
your mistake was not to enter the values as "default answer" in "Pool".
I admit I did not mention this explicitly.
And in the script of "QSelect" there were missing brackets
// Fill the array, numbers from 1 to 144
var arr1 = ;
Must be
var arr1 = ;
I saw that they were missing in my script. Sometimes the HTML editor has its own ideas. Therefore its better to use the source code editor, which you select in your account (upper right corner).
Here I attach two sample surveys.
1. Using the library "PapaParse"
[url]
www.papaparse.com/
[/url]
You need a csv file like this (here called "profiles.csv") uploaded to the "files" directory of the survey.
ProfileID,Field,Grade,Extracurricular,Semester
1,Mechanical Engineering,2.7 (Satisfactory) (Very Good),Student Parliament,3rd semester (Bachelor)
2,Mechanical Engineering,2.7 (Satisfactory) (Very Good),Student Parliament,5th semester (Bachelor)
3,Mechanical Engineering,2.7 (Satisfactory) (Very Good),Student Parliament,3rd semester (Master)
4,Mechanical Engineering,2.7 (Satisfactory) (Very Good),Sports Club,3rd semester (Bachelor)
...
98,Psychology,2.7 (Satisfactory),Student Parliament,5th semester (Bachelor)
99,Psychology,2.7 (Satisfactory),Student Parliament,3rd semester (Master)
100,Psychology,2.7 (Satisfactory),Sports Club,3rd semester (Bachelor)
...
142,Business Administration,2.7 (Satisfactory),Food Bank Volunteer,3rd semester (Bachelor)
143,Business Administration,2.7 (Satisfactory),Food Bank Volunteer,5th semester (Bachelor)
144,Business Administration,2.7 (Satisfactory),Food Bank Volunteer,3rd semester (Master)
All 144 combinations
As there are only twenty names we will use an array for them.
Now the only thing you have to do is to adapt the indices.
QSelect_1 is a string of characters representing the names
This is the first character, starting at position 0 (substr starts at 0) with a length of 1
var y1='{substr(QSelect_1,0,1)}';
This is the second character, starting at position 1 with a length of 1
var y2='{substr(QSelect_1,1,1)}';
The next tests will use the indices 2 and 3, then 4 and 5, and so on
QSelect_2 is a string of three digit numbers representing the profiles
This are the first three characters, starting at position 0 (substr starts at 0) with a length of 3
var x1 = '{substr(QSelect_2,0,3)}';
This are the second three characters, starting at position 3 (substr starts at 0) with a length of 3
var x2 = '{substr(QSelect_2,3,3)}';
The next tests will use the indices 6 and 9, then 12 and 15, and so on
This survey shows two ways to create the table.
- With the library "tinyslider"
- A "normal" HTML table.
Feel free to adapt the colors (all in the css part at the end of the source code resp. in the tinyslider tables as bootstrap declarations)
2. The approach with ExpressionScript that I described already.
Again with different ways to create the table. (tinyslider, bootstrap table, generic)
Again you have to adapt the indices in eqSetx.
Have a look at the default answers of "Pool".
Joffm
BTW: Only such questions like "QSelect" that contain javascript are hidden either by "d-none" or as you see in the code by $('#question{QID}').hide();
All other questions hide by "Always hide this question"