Group: Administrators
Posts: 13K,
Visits: 104K
|
I'm sorry, but this code does not make sense:
<dropdown Gender> / caption = "Select Gender" / options = ("female", "male") If (<%dropdown.gender.caption>% == “female”) {value.genderans=0} Else {value.genderans=1} </dropdown>
#1: You don't want to access the dropdown's caption. You want to query its response. #2: You cannot just put conditional logic in an element and expect it to work. Conditional logic needs to reside in event attributes (/ontrialbegin, ontrialend, etc.). A <dropdown> has no event attributes -- the <surveypage> the dropdown resides on has.
<surveypage mypage> / ontrialend = [if (dropdown.gender.response == "female") values.genderans = 0 else values.genderans = 1; ] / questions = [1=gender; ...] ... </surveypage>
<dropdown Gender> / caption = "Select Gender" / options = ("female", "male") </dropdown>
|