Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Array without subquestion field

  • phelmholz
  • phelmholz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #104619 by phelmholz
Array without subquestion field was created 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
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104622 by holch
Replied by holch on topic Array without subquestion field
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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • phelmholz
  • phelmholz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #104625 by phelmholz
Replied by phelmholz on topic Array without subquestion field
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 topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104627 by holch
Replied by holch on topic Array without subquestion field
you should be able to address this field for specific questions via the CSS id of the question.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
10 years 1 month ago #104635 by david2013
Replied by david2013 on topic Array without subquestion field
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)
Code:
<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 topic has been locked.
  • phelmholz
  • phelmholz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #104665 by phelmholz
Replied by phelmholz on topic Array without subquestion field
Thanks David,

that works fine for me as well!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 month ago #104673 by tpartner
Replied by tpartner on topic Array without subquestion field
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:

Code:
<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 topic has been locked.
More
7 years 8 months ago #139030 by DorotaBochenek1
Replied by DorotaBochenek1 on topic Array without subquestion field
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:

Code:
<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 topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139036 by tpartner
Replied by tpartner on topic Array without subquestion field
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 following user(s) said Thank You: DorotaBochenek1
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose