Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Array without subquestion field

Array without subquestion field 2 years 5 months ago #104619

  • phelmholz
  • phelmholz's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Hello,

I have an array with only one row and I want it without the subquestion field. Is there a possibility to delete the subquestion field in an array?

As you can see on my screenshot, the subquestion field ist still there, but it is empty.





Thanks
Patrick
The administrator has disabled public write access.

Array without subquestion field 2 years 5 months ago #104622

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5058
  • Thank you received: 746
  • Karma: 226
You probably can hide it via CSS somehow (depends on the template). Within the adavanced question settings you can ajust the answer width to "0". It doesn't get rid of the field completely, but reduces it pretty much.
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.

Array without subquestion field 2 years 5 months ago #104625

  • phelmholz
  • phelmholz's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Thanks for fast answering!

I've tried to put the "(sub-)question width" within the advanced settings to "0", but it doesn't change anything.

Problem when hiding it via CSS-template is, that it hides the field for the complete survey and I've also arrays with subquestions.
The administrator has disabled public write access.

Array without subquestion field 2 years 5 months ago #104627

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5058
  • Thank you received: 746
  • Karma: 226
you should be able to address this field for specific questions via the CSS id of the question.
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.

Array without subquestion field 2 years 5 months ago #104635

  • david2013
  • david2013's Avatar
  • Offline
  • Senior Lime
  • Posts: 59
  • Thank you received: 7
  • Karma: 3
Hi,

Depend what template you use, the code may be different. I use template "citronade",

Here is how I hide the subquestion. (I don't know if it's the best way, but work for me)
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
                $('.subquestions-list .col-responses .col-answers').hide();
                $('.subquestions-list thead td').hide();
		$('.answertext').hide();
	});
 
</script>
The administrator has disabled public write access.

Array without subquestion field 2 years 5 months ago #104665

  • phelmholz
  • phelmholz's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Thanks David,

that works fine for me as well!
The administrator has disabled public write access.

Array without subquestion field 2 years 5 months ago #104673

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
Yeah, nice tip David.

If you want to make it question-specific (in case you have more than one array on the page), you can do this:

<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Hide the sub-question column
		$('.subquestions-list .col-responses .col-answers', thisQuestion).hide();
		$('.subquestions-list thead td', thisQuestion).hide();
		$('.subquestions-list .answertext', thisQuestion).hide();
	});
 
</script>
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Array without subquestion field 1 week 4 days ago #139030

Hello everyone!
I am a very fresh lemon .
I would like to know, how to make array without subquestion field but without using programming code. I do not know much about it.
Thank you!

tpartner wrote:
Yeah, nice tip David.

If you want to make it question-specific (in case you have more than one array on the page), you can do this:

<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Hide the sub-question column
		$('.subquestions-list .col-responses .col-answers', thisQuestion).hide();
		$('.subquestions-list thead td', thisQuestion).hide();
		$('.subquestions-list .answertext', thisQuestion).hide();
	});
 
</script>
The administrator has disabled public write access.

Array without subquestion field 1 week 4 days ago #139036

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6111
  • Thank you received: 1356
  • Karma: 532
If using the default template in LimeSurvey version 2.5, you can simply set the advanced question setting "(Sub-)question width:" to 0.

There will still be a little padding around the empty row label cells but it looks okay to me.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: DorotaBochenek1
Moderators: ITEd
Time to create page: 0.256 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form