Array without subquestion field

More
3 years 1 month ago #104619 by phelmholz
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
Attachments:

Please Log in to join the conversation.

More
3 years 1 month ago #104622 by holch
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.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 1 month ago #104625 by phelmholz
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.

Please Log in to join the conversation.

More
3 years 1 month ago #104627 by holch
you should be able to address this field for specific questions via the CSS id of the question.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 1 month ago #104635 by david2013
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>

Please Log in to join the conversation.

More
3 years 1 month ago #104665 by phelmholz
Thanks David,

that works fine for me as well!

Please Log in to join the conversation.

More
3 years 1 month ago #104673 by tpartner
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.

Please Log in to join the conversation.

More
8 months 2 weeks ago #139030 by DorotaBochenek1
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>

Please Log in to join the conversation.

More
8 months 2 weeks ago #139036 by tpartner
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.
Attachments:
The following user(s) said Thank You: DorotaBochenek1

Please Log in to join the conversation.