Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

strpos Condition in question not working

More
3 days 1 hour ago #274540 by preachie
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.17.0+260421 
Own server or LimeSurvey hosting: Own server
Survey theme/template: customized fruity
==================
Hey everyone,
I'm running out of ideas so I hope you can pinpoint me to the right direction.

I already reduced the testcase to a bare mininum.

I have a simple survey with one question group with two simple text questions.
Within the condition of the first question I'm using:

if(strpos("|0|2|", "|1|") > - 1, 1, 0)

so the question shouldn't be displayed. It's displayed anyways.
In the question text I added some debug lines:{if(strpos("|0|2|", "|1|") > - 1, 1, 0)}{if(strpos("|0|1|2|", "|1|") > - 1, 1, 0)}

With the expected result, that the first expression returns 0 and the second 1

I'm not sure if I'm doing something wrong or if it might be a bug, so I would be very thankful if someone would have any ideas :)

Thanks a lot
Mathias
 

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose