Millisecond Forums

isvalidresponse expressions

https://forums.millisecond.com/Topic6659.aspx

By LotteZ - 9/22/2011

Hi all,


I am making a task + survey and want participants to fill in an e-mail adress,
but only if they haven't done this already.
So, in practice I want a radiobutton with 'other' option to fill in an e-mial adress.


However, as my task requires a black background, and I want this too in my survey,
I cannot use radiobuttons since they have a default black font.


Therefore, I tried to just make 2 separate survey questions, and an 'isvalidresponse'
in the surveypage element to make sure participants fill the questions out right.
However, it doesn't work. What did I do wrong?


<textbox email1>
/ caption = "have you given your e-mailadres?"
/ mask = alphabetic
/ validresponse = ("yes", "no")
</textbox>

<textbox email2>
/ caption = "if no, fill in your e-mailadress here"
/ textboxsize = (70,5)
/ maxchars = (200)
/ validresponse = (anyresponse)
</textbox>


<surveypage email>
/ caption = "fill out these questions"
/ questions = [1=email1; 2=email2]
/ isvalidresponse = [(textbox.email1.response == "yes" && length(textbox.email2.response) == 0) || (textbox.email1.response == "no" && length(textbox.email2.response) >= 12)]
</surveypage>

By Dave - 9/23/2011

My impression is that /isvalidresponse etc. simply isn't working properly for <surveypage> elements in current builds. Time to file another bug report...


Regards,


~Dave