Welcome, Guest
Username: Password: Remember me

TOPIC: Array without subquestion field

Array without subquestion field 5 months 3 weeks 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.


screenshot_2014-02-05.png



Thanks
Patrick
The administrator has disabled public write access.

Array without subquestion field 5 months 3 weeks ago #104622

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2569
  • Thank you received: 291
  • Karma: 106
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 5 months 3 weeks 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 5 months 3 weeks ago #104627

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2569
  • Thank you received: 291
  • Karma: 106
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 5 months 3 weeks ago #104635

  • david2013
  • david2013's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 23
  • Thank you received: 3
  • Karma: 2
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 5 months 3 weeks 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 5 months 3 weeks ago #104673

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4071
  • Thank you received: 748
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.175 seconds
Donation Image