Hi,
as I see you do not store the name.
Therefore you can't access anything by {q1.shown}
This you see easily when you activate the survey and enter some data.
Okay either you change the first quuestion to your desired type, like
or (if you want to store the name) use a first question of type "short text" in a different group which you hide by the css class "hidden"
Here you enter this javascript snippet
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
// Define the names
var names = ['Store 1', 'Store 2', 'Store 3', 'Store 4', 'Store 5', 'Store 6'];
// Randomize the names
shuffleArray(names);
// Load the <input> element with the random name
$('#question{QID} input[type="text"]').val(names[0]);
});
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
}
</script>[/i][/i]
You see it is nearly the same, but you do not insert the selected store into the <span> element, but into the text.
And the result you can pupe into the next question
"Have you ever heard of {q1}?"
And the solution without javascript.
Generate a random number (1-5
{if(is_empty(randnum),rand(1,5),randnum)}
and display the store with a nested IF
{if(randnum==1,"Store 1",if(randnum==2,"Store 2",if(randnum=
,"Store 3",if(randnum==4,"Store 4","Store 5"))))}
Joffm