Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Condition on subquestion

Re: Condition on subquestion 3 years 4 months ago #62169

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
You're welcome and thanks for the donation.

Although the members of the LimeSurvey team are volunteers, these donations are needed to pay for servers, etc to keep the project alive.
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: Condition on subquestion 2 years 4 months ago #82053

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Karma: 0
Hi!
I need to do the same but with the kind of question multiple-opt. (No multiple-opt-comments). Probe and using this code for multiple-opt it does not work, displays the check box. Thank you! Ariel
The administrator has disabled public write access.

Re: Condition on subquestion 2 years 4 months ago #82062

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
Try this:
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
		// Add a class to all of the multi-opt rows
		$('.multiple-opt li[id^="javatbd"] .option label span').each(function(i){	
			$(this).parents('li:eq(0)').addClass($(this).attr('class'));
  		});
 
		// And now a bunch of ugly conditionals
		if(!'{TOKEN:FIRSTNAME}') { $('.FIRSTNAME').hide(); }
		if(!'{TOKEN:LASTNAME}') { $('.LASTNAME').hide(); }
		if(!'{TOKEN:EMAIL}') { $('.EMAIL').hide(); }
		if(!'{TOKEN:ATTRIBUTE_2}') { $('.ATTRIBUTE_2').hide(); }
		if(!'{TOKEN:ATTRIBUTE_3}') { $('.ATTRIBUTE_3').hide(); }
		if(!'{TOKEN:ATTRIBUTE_4}') { $('.ATTRIBUTE_4').hide(); }
		if(!'{TOKEN:ATTRIBUTE_5}') { $('.ATTRIBUTE_5').hide(); }
		if(!'{TOKEN:ATTRIBUTE_6}') { $('.ATTRIBUTE_6').hide(); }
		if(!'{TOKEN:ATTRIBUTE_7}') { $('.ATTRIBUTE_7').hide(); }
		if(!'{TOKEN:ATTRIBUTE_8}') { $('.ATTRIBUTE_8').hide(); }
		if(!'{TOKEN:ATTRIBUTE_9}') { $('.ATTRIBUTE_9').hide(); }
		if(!'{TOKEN:ATTRIBUTE_10}') { $('.ATTRIBUTE_10').hide(); }
		if(!'{TOKEN:ATTRIBUTE_11}') { $('.ATTRIBUTE_11').hide(); }
		if(!'{TOKEN:ATTRIBUTE_12}') { $('.ATTRIBUTE_12').hide(); }
		if(!'{TOKEN:ATTRIBUTE_13}') { $('.ATTRIBUTE_13').hide(); }
		if(!'{TOKEN:ATTRIBUTE_14}') { $('.ATTRIBUTE_14').hide(); }
		if(!'{TOKEN:ATTRIBUTE_15}') { $('.ATTRIBUTE_15').hide(); }
 
	});
 
</script>
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: Condition on subquestion 2 years 4 months ago #82064

  • Mazi
  • Mazi's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
1. Which Limesurvey version do you use?

2. Please post a link to an activated sample survey.

3. Please post the code you are using.

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.

Re: Condition on subquestion 2 years 4 months ago #82080

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Karma: 0
Thanks !



/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/

You have this ones:

.multiple-opt-comments ul,.multiple-short-txt ul,.numeric-multi ul {
display: table;
padding: 0%;
margin: 1em;

.multiple-opt-comments ul li,.multiple-short-txt ul li,.numeric-multi ul li
{
display: table-row;


.multiple-opt-comments ul li span.option {
display: table-cell;
vertical-align: baseline;
}




My version its 1.92 thank you very much !
Last Edit: 2 years 4 months ago by arielmosto.
The administrator has disabled public write access.

Re: Condition on subquestion 2 years 4 months ago #82141

  • Mazi
  • Mazi's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
arielmosto wrote:
.multiple-opt-comments ul,.multiple-short-txt ul,.numeric-multi ul {
display: table;
padding: 0%;
margin: 1em;

.multiple-opt-comments ul li,.multiple-short-txt ul li,.numeric-multi ul li
{
display: table-row;


.multiple-opt-comments ul li span.option {
display: table-cell;
vertical-align: baseline;
}
For the multiple choice question without comments the CSS has to look like this:
.multiple-opt ul,.multiple-short-txt ul,.numeric-multi ul {
display: table;
padding: 0%;
margin: 1em;

.multiple-opt ul li,.multiple-short-txt ul li,.numeric-multi ul li
{
display: table-row;


.multiple-opt ul li span.option {
display: table-cell;
vertical-align: baseline;
}

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.

Re: Condition on subquestion 2 years 4 months ago #82147

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Karma: 0
Thanks ! but dont work, Still display de checkbox! The code works perfectly with question type, multiple choice with comments but dont work without comments.

Thanks anyway ! Ariel
The administrator has disabled public write access.

Re: Condition on subquestion 2 years 4 months ago #82193

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
Sorry, my mistake.

Change this line:
$('.multiple-opt li[id^="javatbd"] .option label span').each(function(i){

To this:
$('.multiple-opt li[id^="javatbd"] label span').each(function(i){
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: Condition on subquestion 2 years 4 months ago #82205

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Karma: 0
Works !!

Thank you very much!

I made a donation!

Ariel
Last Edit: 2 years 4 months ago by arielmosto.
The administrator has disabled public write access.

Re: Condition on subquestion 2 years 4 months ago #82262

  • Mazi
  • Mazi's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
Thanks for supporting Limesurvey!

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.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.150 seconds
Donation Image