Filter a multi response but keep 2 last option visible

More
5 years 2 months ago #78178 by fredieby
fredieby created the topic: Filter a multi response but keep 2 last option visible
Hi,

I have Q1 which is a multi quest, I want to filter Q2 which is also a multi quest with Q1 but would like that the 2 last options stay visible.

Can I have any help pls

Cheers,
Fred

Please Log in to join the conversation.

More
5 years 2 months ago #78181 by tpartner
tpartner replied the topic: Filter a multi response but keep 2 last option visible
Are the questions on separate pages?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: fredieby

Please Log in to join the conversation.

More
5 years 2 months ago #78182 by fredieby
fredieby replied the topic: Filter a multi response but keep 2 last option visible
Hi Tony,

Yes they are on seperate page

Cheers,
Fred

Please Log in to join the conversation.

More
5 years 2 months ago - 5 years 2 months ago #78187 by tpartner
tpartner replied the topic: Filter a multi response but keep 2 last option visible
1) Set up your survey to use JavaScript .

2) Add the following script to the source of second question. Replace "QQ" with the second question question ID .
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		var qID = QQ;
 
		var rows = $('#question'+qID+' li[id^="javatbd"]').length;
 
		setTimeout(function() { 
			$('#question'+qID+' li[id^="javatbd"]').each(function(i){
				if(i >= rows-2) {
					$(this).show();
				}
			});
		}, 200);			
	});
 
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 2 months ago by tpartner.
The following user(s) said Thank You: fredieby

Please Log in to join the conversation.

More
5 years 2 months ago #78243 by fredieby
fredieby replied the topic: Filter a multi response but keep 2 last option visible
:woohoo: Great Tony!

Thank you very much!!!

Cheers,
Fred

Please Log in to join the conversation.

More
5 years 2 months ago #78245 by fredieby
fredieby replied the topic: Filter a multi response but keep 2 last option visible
Hi again Tony,

Im having a problem with the script, when I click on previous it erase the answer in the last 2 option :(

Cheers,
Fred

Please Log in to join the conversation.

More
5 years 2 months ago #78402 by fredieby
fredieby replied the topic: Filter a multi response but keep 2 last option visible
Hello,

Any help on this issue?

Cheers,
Fred

Please Log in to join the conversation.

More
5 years 2 months ago #78669 by Mazi
Mazi replied the topic: Filter a multi response but keep 2 last option visible

fredieby wrote: Hello,

Any help on this issue?

Cheers,
Fred

Tony does all this valuable help in his free time. He offers advanced (paid) support though. Try to contact him by forum PM if necessary.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now