This command is used to show a series of questions to a participant and allow them to fill in the answers. It can show both text and images to the participant, and pose questions. Answers can take the form of …
This command sets out surveys in a specific way, using a particular font and layout. You cannot adjust these. Nor can you sent a time-limit for completion. If the precise formatting and presentation of your questions is important to you you should use the other, more flexible but harder to set up, capabilities of PsyScript to display the questions as you would stimuli.
The first item in each line of the above table tells the software what kind of display or question that row represents. The possible values are as follows:
First parameter | Other parameters | Purpose |
---|---|---|
showtext | text to be shown | Show anything up to a few paragraphs of text, to explain ensuing questions. |
showimage | image filename | Show an image, to explain ensuing questions. |
shorttext | label | allow users to enter a few words |
longtext | label | allow users to enter a few sentences (adds scroll bar where needed) |
slider | label,min,max,minlabel,maxlabel | allow users to set a slider position |
radiorow | label,option 1, option 2, option 3 ... | allow users to pick exactly one option shown in a row |
radiocolumn | label,option 1, option 2, option 3 ... | allow users to pick exactly one option shown in a column |
continue | button text, label text | Allows you to change the text used for the continue button at the end of the survey. |
Survey responses are returned as an array in the variable $lastResponses. You can write them straight to the log file using either of the following instructions …
or you could log the responses individually …
… depending on what format you want the results in. You can also have PsyScript extract one of the responses and use it in the script …
The contents of your survey are entered into a table in your script. Here's an example table, showing at least one of each kind of entry:
Here's the line of code used to make the survey appear:
Here's what the result looks like:
display survey from table name
Displays the survey described by that table, then waits for the participant to click the 'Continue' button before continuing.
display survey from table ReactionToSpeechSurvey
None.