Hi Dave & other admins,
I hope it's okay I respond to this threat even though it's Inquisit 3, I work with Inquisit 4.
I already got great help from Dave and was hoping you could help me with a similar issue here. I want to disable the Next button (in my case, labeled "Make Decision") until participants have clicked on at lost 4 cells (that is, completed at least 4 trials within my experimental block).
I successfully added the following code, which collects the number of trials completed:
/ontrialend = [values.count_All = values.count_A1Weather + values.count_A2Sights + values.count_A3Price + values.count_A4Dining + values.count_A5Five + values.count_A6Six + values.count_B1Weather + values.count_B2Sights + values.count_B3Price + values.count_B4Dining + values.count_B5Five + values.count_B6Six + values.count_C1Weather + values.count_C2Sights + values.count_C3Price + values.count_C4Dining + values.count_C5Five + values.count_C6Six + values.count_D1Weather + values.count_D2Sights + values.count_D3Price + values.count_D4Dining + values.count_D5Five + values.count_D6Six + values.count_E1Weather + values.count_E2Sights +
values.count_E3Price + values.count_E4Dining + values.count_E5Five +values.count_E6Six]
However, I am not sure where to insert "[if (values.count_All >= 4) ...]" etc. into my code to connect the variable "values.count_All" to my Next button. Or would it be better to use "/isvalidresponse"? My code already has "/validresponse", so I am not sure how to go about adding "/isvalidresponse" as well. I know they can be used together.
I tried adding the if command to the following line but it only influences the concat, not that the participant is being send to the next page:
/ontrialend = [if (trial.decisionboard.response == "finish" && values.count_All >= 4) {values.viewingorder = concat(values.viewingorder, "decision")}]
I'm attaching the code. I'm sure this is easy to fix, I just can't seem to figure it out.
Thanks again so much! This forum is a lifesaver!
Best,
Julia