How to dynamically change if a question is required


Author
Message
gaumarjos
gaumarjos
Respected Member (355 reputation)Respected Member (355 reputation)Respected Member (355 reputation)Respected Member (355 reputation)Respected Member (355 reputation)Respected Member (355 reputation)Respected Member (355 reputation)Respected Member (355 reputation)Respected Member (355 reputation)
Group: Forum Members
Posts: 2, Visits: 11
Hi I want people to first be notified if they didn't answer a survey question and then be able to skip, in lines with ideas of informed consent and being able to skip questions. . However, it appears the status of /required does not update until after the whole trial (surveypage) has been submitted. Is there a workaround? 

I have tried a lot of options but the most obvious, which doesn't work is:

For instance this doesn't work

<surveypage cultural_religious>
/caption ="<%values.demographicpageinstructions%>"
/ fontstyle = ("Verdana", -14, false, true, false, false, 5, 0)
/ questions = [1=school; 2=govt; 3=religiosity]
/ itemspacing = 2%
/ showbackbutton = false
/ ontrialend = [radiobuttons.religiosity.required = false]
</surveypage>
And this works (changing it to not required at the beginning) but doesn't do what I want

<surveypage cultural_religious>
/ ontrialbegin = [radiobuttons.religiosity.required = false]
/caption ="<%values.demographicpageinstructions%>"
/ fontstyle = ("Verdana", -14, false, true, false, false, 5, 0)
/ questions = [1=school; 2=govt; 3=religiosity] 
/ itemspacing = 2%
/ showbackbutton = false
</surveypage>



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: 104K
> However, it appears the status of /required does not update until after the whole trial (surveypage) has been submitted. Is there a > workaround?

/ontrialend is executed after the responses have been submitted. If you were to run the same page / question again, the required status would be false. It is not possible to change a question's required status *while* the page / trial is running.

There is no real workaround. A somewhat inelegant option would be to include an explicit "decline to answer" response option:

<survey mysurvey>
/ pages = [1=mypage]
</survey>

<surveypage mypage>
/ questions = [1=myrb]
</surveypage>

<radiobuttons myrb>
/ caption = "Pick one"
/ options = ("A", "B", "Decline to answer")
/ required = true
</radiobuttons>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search