Error message for textboxes


Author
Message
anabela_c
anabela_c
Respected Member (386 reputation)Respected Member (386 reputation)Respected Member (386 reputation)Respected Member (386 reputation)Respected Member (386 reputation)Respected Member (386 reputation)Respected Member (386 reputation)Respected Member (386 reputation)Respected Member (386 reputation)
Group: Forum Members
Posts: 23, Visits: 75
Hi all! When I present a surveypage containing 2 textboxes I need participants to be only allowed to introduce values that sum 5 in total (not higher nor lower, e.g. 2 and 3), if they introduce values different than 5 I would like them to see a text indicating the error so they can correct it. I have tried as follows:

<surveypage CoalitionOffer>
/ questions = [1=OfferBox1, OfferBox2]
/ stimulusframes = [1 = OfferPic, CoalitionOfferText, OfferBoxYou, OfferBoxPartner]
/ showbackbutton = false
/ showquestionnumbers = false
/ showpagenumbers = false
/ showmousecursor = true
/ finishlabel = "Click here to continue"
/ branch = [if (textbox.OfferBox1.response + textbox.OfferBox2.response != 5) text.erroroffer]
/ branch = [if (textbox.OfferBox1.response + textbox.OfferBox2.response == 5) likert.Liking1]
</surveypage>

<text erroroffer>
/ items = ("please introduce the correct values")
/ color = (0, 255, 0)
/ fontstyle = ("Arial", 3%, true)
/ position = (50%,50%)
/ vjustify = center
</text>

In this case, If they introduce “5 and 6” they are not allowed to continue but the error message is not displayed. And f they type “5 and 4” they move to the next page "likert.liking1".

Thank you in advance for your help!!
Anabela

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search