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!