I am attempting to embed the Wason Rule Discovery Test into a Qualtrics survey. I have the following code that I have been trying to work with, but I am having no luck.
<block wasonblock>
/ trials = [1=enter_sequence]
</block>
<surveypage enter_sequence>
/ caption = "We’ve chosen a rule that some sequences of three numbers obey — and some do not.
Your job is to guess what the rule is.
We’ll start by telling you that the sequence 2, 4, 8 obeys the rule.
2 4 8 obeys the rule
Enter a number sequence in the boxes below, and we’ll tell you whether it satisfies the rule or not.
You can test as many sequences as you want."
/ questions = t1=n1; 2=n2; 3=n3]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "CHECK"
/ navigationbuttonsize = (20%, 5%)
/ nextbuttonposition = (40%, 60%)
/ branch = rif (textbox.n1.response < textbox.n2.response && textbox.n2.response < textbox.n3.response) surveypage.correctpage
else surveypage.errorpage]
</surveypage>
<textbox n1>
/ textboxsize = (20%, 5%)
/ mask = integer
/ position = (15%, 45%)
</textbox>
<textbox n2>
/ textboxsize = (20%, 5%)
/ mask = integer
/ position = (40%, 45%)
</textbox>
<textbox n3>
/ textboxsize = (20%, 5%)
/ mask = integer
/ position = (65%, 45%)
</textbox>
<surveypage correctpage>
/ caption = "Correct!
The sequence
<%textbox.n1.response%> <%textbox.n2.response%> <%textbox.n3.response%>
obeys the rule."
/ questions = t1=solve]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "NEXT"
/ navigationbuttonsize = (20%, 5%)
/ nextbuttonposition = (40%, 60%)
/ branch = rif (radiobuttons.solve.response == "1") surveypage.enter_rule
else surveypage.enter_sequence]
</surveypage>
<surveypage errorpage>
/ caption = "Wrong!
The sequence
<%textbox.n1.response%> <%textbox.n2.response%> <%textbox.n3.response%>
does NOT obey the rule."
/ questions = t1=solve]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "NEXT"
/ navigationbuttonsize = (20%, 5%)
/ nextbuttonposition = (40%, 60%)
/ branch = rif (radiobuttons.solve.response == "1") surveypage.enter_rule
else surveypage.enter_sequence]
</surveypage>
<radiobuttons solve>
/ options = ("Check another sequence.", "Stop. I know the rule.")
/ optionvalues = ("0", "1")
/ defaultresponse = ("0")
</radiobuttons>
<surveypage enter_rule>
/ caption = "Describe the rule:"
/ questions = t1=rule_description]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "FINISH"
/ navigationbuttonsize = (20%, 5%)
/ nextbuttonposition = (40%, 60%)
</surveypage>
<textbox rule_description>
/ textboxsize = (50%, 30%)
/ multiline = true
</textbox>
Page 1 / 1
That isn't code Qualtrics can understand. You would have to write the code in JavaScript, and it won't look anything remotely like your example.
Thank you TomG. I understand. I did happen to come across an open source code. Would this code be able to work with Qualitrics?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Confirmation Bias Activity/Learning Object (free to use or link to)</title>
<style type="text/css">
body{
background-color:white;
color:black;
font-family:sans-serif;
}
th{
text-align:left;
border:solid 1px black;
padding:0 0.25em 0 0.25em;
}
td{
vertical-align:top
border-left:1px solid #aaa;
border-right:1px solid #aaa;
padding:0.25em;
}
td[colspan]{
border:1px solid #aaa;
text-align:center;
}
table{
border-collapse:collapse;
border:1px solid black;
margin-left:auto;
margin-right:auto;
}
p{
text-align:left;
}
.happy{
color:blue;
text-align:center;
}
.example{
color:blue;
}
textarea{
vertical-align:top;
}
a{
text-decoration:none;
color:blue;
}
a:visited{
color:#0000AA;
}
a:hover{
color:#5500AA;
}
.trialtop{
background-color:#f0fff8;
border-top:solid 1px #aaa;
}
.trialbot{
background-color:#f0fff8;
border-bottom:solid 1px #aaa;
}
.moral{
background-color:#f0fff8;
}
.trial td{
padding:.5em .25em .5em .25em;
}
.credit, .credit a{
font-size:xx-small;
color:#aaaaaa;
text-align:center;
}
</style>
</head>
<body onload="javascript:document.forms[0].a2720.focus();">
<h1>Confirmation Bias Activity</h1>
<p>Welcome. This activity will illustrate what is known as <a target="_blank" href="http://en.wikipedia.com/wiki/Confirmation_Bias"><b>confirmation
bias</b></a>.
Try to enter number triples that satisfy the same rule as the example. You can keep track of your hypotheses in the provided area, and track your
confidence in your hypothesis.</p>
<p>When you are certain of the rule, click "I know the answer!" to see how you did.</p>
<form action="" method="post">
<table>
<thead>
<tr><th></th><th colspan="3">Trial</th><th>Fits Rule?</th><th>Find the rule</th><th>Confidence</th><th></th></tr>
<tr class="example"><td>Example: </td><td>42, </td><td>32, </td><td>12</td><td class="happy"><img src="yes.png" alt="Correct" /></td><td></td><td></td><td></td></tr>
</thead>
<tbody>
<tr class="trialtop">
<td>Trial:</td>
<td><input type="text" maxlength="3" size="3" name="a2720" tabindex="1" />,</td>
<td><input type="text" maxlength="3" size="3" name="b2720" tabindex="2" />,</td>
<td><input type="text" maxlength="3" size="3" name="c2720" tabindex="3" /></td>
<td></td>
<td>Hypothesis: <textarea name="r2720" rows="5" cols="30" onfocus="if(this.value=='No hypothesis')this.value='';" tabindex="5" />No hypothesis</textarea></td>
<td>Confidence:<br />
<input type="radio" id="c1" name="conf" value="Not confident" checked="checked" tabindex="6" /><label for="c1">Not Confident</label><br />
<input type="radio" id="c2" name="conf" value="Somewhat Confident" tabindex="7" /><label for="c2">Somewhat Confident</label><br />
<input type="radio" id="c3" name="conf" value="Fairly Confident" tabindex="8" /><label for="c3">Fairly Confident</label><br />
<input type="radio" id="c4" name="conf" value="Almost Certain" tabindex="9" /><label for="c4">Almost Certain</label><br />
</td>
<td><input type="submit" name="submit" value="Check" tabindex="10" /></td>
</tr>
<tr class="trialbot"><td></td><td></td><td></td><td></td><td></td><td></td><td>
<input type="submit" name="submit" value="I know the answer!" tabindex="11" />
</td><td></td></tr>
</tbody>
</table></form>
<a href="?reset" title="Reset">.</a>
<div class="credit">Learning Object by Rod McFarland for Simon Fraser University.<br /><a
href="mailto:rod@xamai.ca?subject=Confirmation Bias Translation">Help with translation!</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Confirmation Bias Activity/Learning Object (free to use or link to)</title>
<style type="text/css">
body{
background-color:white;
color:black;
font-family:sans-serif;
}
th{
text-align:left;
border:solid 1px black;
padding:0 0.25em 0 0.25em;
}
td{
vertical-align:top
border-left:1px solid #aaa;
border-right:1px solid #aaa;
padding:0.25em;
}
td[colspan]{
border:1px solid #aaa;
text-align:center;
}
table{
border-collapse:collapse;
border:1px solid black;
margin-left:auto;
margin-right:auto;
}
p{
text-align:left;
}
.happy{
color:blue;
text-align:center;
}
.example{
color:blue;
}
textarea{
vertical-align:top;
}
a{
text-decoration:none;
color:blue;
}
a:visited{
color:#0000AA;
}
a:hover{
color:#5500AA;
}
.trialtop{
background-color:#f0fff8;
border-top:solid 1px #aaa;
}
.trialbot{
background-color:#f0fff8;
border-bottom:solid 1px #aaa;
}
.moral{
background-color:#f0fff8;
}
.trial td{
padding:.5em .25em .5em .25em;
}
.credit, .credit a{
font-size:xx-small;
color:#aaaaaa;
text-align:center;
}
</style>
</head>
<body onload="javascript:document.forms[0].a2720.focus();">
<h1>Confirmation Bias Activity</h1>
<p>Welcome. This activity will illustrate what is known as <a target="_blank" href="http://en.wikipedia.com/wiki/Confirmation_Bias"><b>confirmation
bias</b></a>.
Try to enter number triples that satisfy the same rule as the example. You can keep track of your hypotheses in the provided area, and track your
confidence in your hypothesis.</p>
<p>When you are certain of the rule, click "I know the answer!" to see how you did.</p>
<form action="" method="post">
<table>
<thead>
<tr><th></th><th colspan="3">Trial</th><th>Fits Rule?</th><th>Find the rule</th><th>Confidence</th><th></th></tr>
<tr class="example"><td>Example: </td><td>42, </td><td>32, </td><td>12</td><td class="happy"><img src="yes.png" alt="Correct" /></td><td></td><td></td><td></td></tr>
</thead>
<tbody>
<tr class="trialtop">
<td>Trial:</td>
<td><input type="text" maxlength="3" size="3" name="a2720" tabindex="1" />,</td>
<td><input type="text" maxlength="3" size="3" name="b2720" tabindex="2" />,</td>
<td><input type="text" maxlength="3" size="3" name="c2720" tabindex="3" /></td>
<td></td>
<td>Hypothesis: <textarea name="r2720" rows="5" cols="30" onfocus="if(this.value=='No hypothesis')this.value='';" tabindex="5" />No hypothesis</textarea></td>
<td>Confidence:<br />
<input type="radio" id="c1" name="conf" value="Not confident" checked="checked" tabindex="6" /><label for="c1">Not Confident</label><br />
<input type="radio" id="c2" name="conf" value="Somewhat Confident" tabindex="7" /><label for="c2">Somewhat Confident</label><br />
<input type="radio" id="c3" name="conf" value="Fairly Confident" tabindex="8" /><label for="c3">Fairly Confident</label><br />
<input type="radio" id="c4" name="conf" value="Almost Certain" tabindex="9" /><label for="c4">Almost Certain</label><br />
</td>
<td><input type="submit" name="submit" value="Check" tabindex="10" /></td>
</tr>
<tr class="trialbot"><td></td><td></td><td></td><td></td><td></td><td></td><td>
<input type="submit" name="submit" value="I know the answer!" tabindex="11" />
</td><td></td></tr>
</tbody>
</table></form>
<a href="?reset" title="Reset">.</a>
<div class="credit">Learning Object by Rod McFarland for Simon Fraser University.<br /><a
href="mailto:rod@xamai.ca?subject=Confirmation Bias Translation">Help with translation!</a></div>
</body>
</html>
Excuse my ingnorance. Whenever I post the code, it converts it to look as above. I do not know how to show just the code by itself in the textbox above.
!
!
!
!
!
No, that is CSS and html (in that order). Qualtrics creates the html for a question, so you can't use your own. Then the CSS rules that style the html have to match the html elements. Qualtrics themes provide the CSS, but you can override it.
To replicate that html form it looks like you need three Qualtrics questions: a text form with three inputs, a text input, and a multiple choice. Anyway, the html you provided is just an input form, it doesn't really do anything (`<form action="" method="post">`). You would need some kind of script to check the input.
To add code to your post put it between three backticks like
\\`\\`\\`
your code goes here
\\`\\`\\`
Then it will look like:
```
your code goes here
```
To replicate that html form it looks like you need three Qualtrics questions: a text form with three inputs, a text input, and a multiple choice. Anyway, the html you provided is just an input form, it doesn't really do anything (`<form action="" method="post">`). You would need some kind of script to check the input.
To add code to your post put it between three backticks like
\\`\\`\\`
your code goes here
\\`\\`\\`
Then it will look like:
```
your code goes here
```
@TomG Thank you for your response.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.