Welcome, Guest
Username: Password: Remember me

TOPIC: Exclude item in the question

Exclude item in the question 2 years 10 months ago #66386

  • rafael_ur
  • rafael_ur's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 74
  • Karma: 0
I have these questions:

P1 What political party will you vote?
1. PSOE
2. PP
3. UPN
4. IU

P2 What political party won’t you never vote? I want to exclude the chosen political party, for example, if the person has chosen in P1 , PSOE, the items to show in P2 would be:
1. PP
2. UPN
3. IU

Please, how can I do it?
Many thanks.
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66389

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2621
  • Thank you received: 307
  • Karma: 113
Have a look at the array filter, or better the array exclusion filter:
docs.limesurvey.org/Question+type+-+Arra...ray_exclusion_filter

And may I answer the questions:

Nenhuma dessas!
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
Last Edit: 2 years 10 months ago by holch.
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66392

  • rafael_ur
  • rafael_ur's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 74
  • Karma: 0
Holch,

But my question P1 is list radio no multiple choice question. However, I've tried and not working.
Rafael
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66393

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2621
  • Thank you received: 307
  • Karma: 113
Hmm, OK. From what I know, the base question has to be multiple choice. What you could do is use a multiple choice question and set the maximum number of answers to "1".

I tried it with two multiple choice questions, the first being limited to 1 answer and it works. Not ideal, because people might expect to be able to give more then one answer when they see the tick boxes, but you can always tell them before in the instructions.

It did not work for me with the single choice question either.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66395

  • rafael_ur
  • rafael_ur's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 74
  • Karma: 0
Holch, it's a solution.
Thank,
Rafael
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66397

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2621
  • Thank you received: 307
  • Karma: 113
I am sure that Tony (tpartner) would find a solution in Javascript to make it work for single choice question as the source as well.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66402

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4127
  • Thank you received: 761
  • Karma: 347
I am sure that Tony (tpartner) would find a solution in Javascript to make it work for single choice question as the source as well.
Not required. Why re-invent your wheel? :cheer:
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66404

  • rafael_ur
  • rafael_ur's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 74
  • Karma: 0
Hi Toni/Holch:

This is what I did, I'm sure there's a more elegant solution.

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var val5 = "{INSERTANS:17695X130X2321}";
//alert(val5);
if (val5 =="PSOE") {
var p1 = 1;
}
else if (val5 =="PP") {
var p1 = 2;
}
else if (val5 =="UPN") {
var p1 = 3;
}
else if (val5 =="IU") {
var p1 = 4;
}
$('#javatbd17695X161X2326' + p1 +'').hide();

});
</script>
The administrator has disabled public write access.

Re: Exclude item in the question 2 years 10 months ago #66409

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
Can you please add your solution to the workaround section of our manual so other users can beneffit from your solution, too!?

Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.136 seconds
Donation Image