valid response in checkbox


Author
Message
Andraster
Andraster
Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)
Group: Forum Members
Posts: 3, Visits: 88
Hey guys,
I am trying to create a simple checkbox survey. I can't figure out how to define the valid and correct responses though. No matter ho i define them, as soon as I define any validresponse at all, I can't click the "Next" Button when I run the experiment because the answer is not considered valid. It would be great if someone could help me with this, thank you.

<survey survey>
/ pages = [1 = p1]
</survey>

<surveypage p1>
/ questions = [1 = q1]
</surveypage>

<checkboxes q1>
/ options = ("Answer 1", "Answer 2", "Answer 3")
/ optionvalues = ("1", "2", "3")
/ validresponse = ("1", "2", "3")
</checkboxes>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
You usually don't have to define /validresponse for checkboxes at all (i.e., you can simply remove the /validresponse attribute). Since <checkboxex> allow for multiple simultaneous answers (i.e., you can check one option, two, or all three), you would only be able to move on with all three checked here when /validresponse is defined.

Assuming you want to restrict responses such that a participant has to select one option -- and only one -- you do that via the /range attribute:

<survey survey>
/ pages = [1 = p1]
</survey>

<surveypage p1>
/ questions = [1 = q1]
</surveypage>

<checkboxes q1>
/ caption = "Check one option (and one only):"
/ options = ("Answer 1", "Answer 2", "Answer 3")
/ optionvalues = ("1", "2", "3")
/ range = (1,1)
</checkboxes>

Hope this helps.

Andraster
Andraster
Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)Partner Member (567 reputation)
Group: Forum Members
Posts: 3, Visits: 88
Great, this helps a lot. Thank you!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search