FAQ

I see ‘QRTLib…..’ in some example files where I would expect ‘QRTE….’, why is this?

QRTLib is a previous name of the engine, we later changed the name to QRTE. For convenience and for legacy code not to break, we set up the newer versions of the engine in such a way that QRTLib and QRTE can be used interchangeably.

The calculated duration in my data file sometimes has ’round’ values and sometimes values with a lot of decimals. Why is this?

The QRTEngine always attempts to use the latest time measuring technique. In the latest browsers, this is a method that returns high-resolution timestamps, which go into many decimals of supposed precision. In older browsers, this method is not available to the QRTEngine, upon which it resorts to a less-precise method that returns timestamps as integer values (’round’ values). The difference in reported duration is thus due to differences in browsers.

It is important to note that computers with a european locale might expect decimal numbers to be delimited with commas (,) instead of dots (.). This might cause problems when importing the data file the parser returns to a data analysis program such as Excel or SPSS.

The parser generates an empty (1kb.) file?

This may happen when a dataset containing partial responses is downloaded. Before downloading in Qualtrics, go to ‘View Reports’ and create a report in which only the complete responses are included. Now go to ‘Download data’.\

Is it the case that a new frame (ie a question) always replaced the previous one, or would it be possible show a new one but retain the previous one? E.g., we sometimes show key assignments at the top of the screen, and there it would be helpful to show that Question and just keep it throughout.

It is possible to keep a stimulus (a question) outside of the ‘trial’ queue that is handled by the QRTEngine, thus it will never be hidden. CSS can then be used to position that question absolutely at the top of the screen during the whole trial sequence.

Simply add a question to the block and do not add any of the JavaScript that a QRTE stimulus would require you to add. This will cause the QRTEngine to ignore that question Add the following CSS to the HTML view of the question to make it display at the top of the screen:

JavaScript

1

2

3

<style>

#QID<question id> {position:fixed;top:0%;left:50%;}

</style>

Replace <question id> with the qualtrics question id. This is a bit difficult to find, the easiest way I’ve found is to use piped text to pipe the ‘question text’ of that question to some other question, which will give you text similar to the following:

JavaScript

1

${q://1_QID65/QuestionText}

The QID part plus the number following it is then the questionId, which is QID65 in this case.

How to implement feedback after/ during a trial?

We have written a tutorial on this, which can be found here – Conditional Stimuli. If you don’t feel like reading the whole tutorial, this piece of code should suffice. In order to show a specific stimulus upon giving the correct response to a Cue, one adds a parameter called ‘conditional’ to the feedback stimulus function call, like so:

JavaScript

1

2

3

4

5

6

7

8

9

10

QRTE.Stimulus({

id:'CorFeedback',

onShowFn:function(){},

conditional:function(){

// This function is called before this stimulus is displayed.

// If the line below evaluates to true (Accuracy of trial is 1, correct //response), this

// stimulus is displayed.

returnQRTE.getTrialData("Cue[ACC]")===1;

}

});

The conditional function should return a boolean (true or false). In this case, it checks whether the response given to the stimulus called Cue is correct, which will make this stimulus show. The Tutorial expands on what can be done in these conditionals.

My normal Survey Questions are hidden, how do I unhide them?

The QRTEngine hides each Question by default, so that there’s no chance of having your full trial shown to the participant in a flash. Sadly, this also means that normal questions are hidden by default. We have provided an easy fix for this issue, simply add the following code to the JavaScript of the question you want unhidden:

Unhide questions

JavaScript

1

2

3

4

5

Qualtrics.SurveyEngine.addOnload(function()

{

QRTE.unhideQuestions();//Unhide all questions

$('NextButton').style.display='inline';//Unhide next Button

});

In v15, QRTEngine hides the answer choices by default, how do I show them again if I want to make use of them inside a trial?

Unfortunately, there is no function you can call to unhide these answer choices options. We have to resort to adding the highlighted line of code to the onShow function for the Stimulus in question:

JavaScript

1

2

3

4

5

6

QRTE.Stimulus({

id:'TextInput',

onShowFn:function(){

$$("#"+this.questionId+" .ChoiceStructure")[0].style.display='block';

},

});

This will find the so-called ‘ChoiceStructure’ and unhide it.

Are there any other options of proceeding a trial, besides pressing a key and/or waiting for time to run out?

Currently there aren’t, but it by calling the function ‘QRTE.proceed()’, one should be able to build their own methods of proceeding trials. For example, here is how to add a ‘next button’ that proceed the trial to the next stimuli, rather than to the next trial.

Add the following HTML to the stimulus that needs to have a next button: