- Posts: 15
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array filter with exclusive option
- wireframemedia
- Topic Author
- Offline
- New Member
Less
More
13 years 7 months ago #48413
by wireframemedia
Replied by wireframemedia on topic Array filter with exclusive option
I will try that right now.
Do I keep the array filter on?
Thanks.
Dawna
Do I keep the array filter on?
Thanks.
Dawna
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
13 years 7 months ago #48414
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array filter with exclusive option
Yup, turn on the filter for all questions.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- wireframemedia
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
13 years 7 months ago #48415
by wireframemedia
Replied by wireframemedia on topic Array filter with exclusive option
Ok I did it and I changed the code of 50 to 98 but it won't show up. Drat!
I tried it both ways with your 50 and with my 98 which is the correct code.
Any ideas?
The browser says "done but with errors..."
Thanks.
Dawna
I tried it both ways with your 50 and with my 98 which is the correct code.
Any ideas?
The browser says "done but with errors..."
Thanks.
Dawna
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
13 years 7 months ago #48416
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array filter with exclusive option
The 50 is just a 50 millisecond delay before firing the script so the filtering can happen first, it should be left alone.
What browser are you using? I tested with IE7 and Firefox.
Can you check the log to see what the errors are.
Failing that, can you activate the survey so I can check? (send me a PM with the URL if it's sensitive)
What browser are you using? I tested with IE7 and Firefox.
Can you check the log to see what the errors are.
Failing that, can you activate the survey so I can check? (send me a PM with the URL if it's sensitive)
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- wireframemedia
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
13 years 7 months ago #48418
by wireframemedia
Replied by wireframemedia on topic Array filter with exclusive option
Ok I've put it back and still no go.
I'm using IE8 and I also tried Firefox. When I view the source it is in there....
I'll send you a PM with the link. It is a high-level sensitive survey for one of the big Social Networking companies.
Thanks so much for all your help with this.
Dawna
I'm using IE8 and I also tried Firefox. When I view the source it is in there....
I'll send you a PM with the link. It is a high-level sensitive survey for one of the big Social Networking companies.
Thanks so much for all your help with this.
Dawna
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
13 years 7 months ago #48419
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array filter with exclusive option
Although I don't get any JS errors I see the problem - it's the Limespired template messing things up.
Use this. I would also move it to the question help so it doesn't show in the alert that pops up if the question is unanswered. Note that this will only display the last option - gimme a minute to modify it to display the last two.
Use this. I would also move it to the question help so it doesn't show in the alert that pops up if the question is unanswered. Note that this will only display the last option - gimme a minute to modify it to display the last two.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ window.setTimeout(function() { $('.survey-question-answer li:last').show(); $('.survey-question-answer input[type=hidden]:eq(0)').attr('value', 'on'); }, 50); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- wireframemedia
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
13 years 7 months ago #48420
by wireframemedia
Replied by wireframemedia on topic Array filter with exclusive option
Ok great! Thank you.
I'll try this and then check back in a few for the other.
Thanks so much!!!
Dawna
I'll try this and then check back in a few for the other.
Thanks so much!!!
Dawna
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
13 years 7 months ago #48421
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array filter with exclusive option
And this should show the last two options:
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ var itemCount = $('survey-question-answer li').length; itemIndex = Number(itemCount-2); window.setTimeout(function() { $('survey-question-answer li:eq('+itemIndex+')').show(); $('survey-question-answer li:eq('+itemIndex+') input[type=hidden]:eq(0)').attr('value', 'on'); $('survey-question-answer li:last').show(); $('survey-question-answer li:last input[type=hidden]:eq(0)').attr('value', 'on'); }, 50); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- wireframemedia
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
13 years 7 months ago #48422
by wireframemedia
Replied by wireframemedia on topic Array filter with exclusive option
Ok we're getting very close here.
The first script you provided worked somewhat...it showed me the Other (please specify) option but not the none of the above option. The second script didn't show either of them so the first one was very close....
Getting there...
Dawna
The first script you provided worked somewhat...it showed me the Other (please specify) option but not the none of the above option. The second script didn't show either of them so the first one was very close....
Getting there...
Dawna
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
13 years 7 months ago #48423
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array filter with exclusive option
Dawna, I've sent you a PM (and no it's not rude )
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- wireframemedia
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
13 years 7 months ago #48424
by wireframemedia
Replied by wireframemedia on topic Array filter with exclusive option
Thanks Tony.
How do I get it?
Sorry, I am so new to this forum, not sure where to retrieve...
Dawna
How do I get it?
Sorry, I am so new to this forum, not sure where to retrieve...
Dawna
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
13 years 7 months ago #48425
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array filter with exclusive option
Go to the homepage and you should see a link in the right column.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.