0 votes
ago in SoSci Survey (English) by s291395 (130 points)

Hi,

I'm working on a factorial experiment, using a sub-questionnaire to show different vignettes to the respondents. However, when in the sub-questionnaire, the progress bar is set to 33% and does not update. As this part takes up quite some survey time I would like to show the respondent that they are progressing.

I see that you can set the progress manually with option('progress', ##);, but don't know how to incorporate this.

My code to start the sub-questionnaire looks like this

// Loop over vignette IDs with loopPage
$Var = loopPage($keyVar);
// Add key to attribute order array
$orderAtt[] = value($Var, 'free');
// Start multilevel survey, sending attribute order and vignette key
multiLevelDown('sub', $orderAtt);

where $orderAtt contains an array with information about stimuli order, and $keyVar contains a vignette id to be used with database for contents.

I'm thinking it might be an idea to create a variable $progress, set it to say 2 and for each loop add another 2. Tat could be added to $orderAtt and used to update the progress bar.

However, I do not know where in the code to put such a solution, as I'm not understanding exactly how the loopPage works.

Any help would be appreciated!

1 Answer

0 votes
ago by SoSci Survey (322k points)

A soon as you use multiLevelDown(), a new case is started, and this has its own progress bar. Also, SoSci Survey does not know a-priori how many loops to expect, and therefore cannot adjust the progress indicator before going down into the subordinate case.

In short, the easiest solution is to disable the progress bar in the questionnaire settings.

The more elaborate way is to adjust the progress bar via option(). To stay consistent in the subordinate case, you must not only give the $Var, but you will also need a counter.

$i = loopPage(count($keyVar));
$Var = $keyVar[$i];

Handle this counter to the subordinate interview as foundation to calculate and adjust the progress bar.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...