- Posts: 21
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Hiding the main question of array type questions
- Foram
- Topic Author
- Offline
- Junior Member
Less
More
9 years 10 months ago #109274
by Foram
Hiding the main question of array type questions was created by Foram
Hi,
I have added array type question in my survey. I only have sub-questions for it.No Main question. So I have left the question field blank when I created the survey. But now when I am testing the survey that blank field is being displayed. Can I remove this space ?
I have added array type question in my survey. I only have sub-questions for it.No Main question. So I have left the question field blank when I created the survey. But now when I am testing the survey that blank field is being displayed. Can I remove this space ?
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
9 years 10 months ago #109275
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Hiding the main question of array type questions
LimeSurvey version?
Template being used?
.
Template being used?
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Foram
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 0
9 years 10 months ago #109281
by Foram
Replied by Foram on topic Hiding the main question of array type questions
LimeSurvey Version : 2.05+
Template used : basic
I have created the copy of basic template and I am changing it according to our requirement.
Template used : basic
I have created the copy of basic template and I am changing it according to our requirement.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
9 years 10 months ago #109318
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Hiding the main question of array type questions
Hi,
I think you can do it like this, without any system, in question.pstpl:
replace
by
Maybe some correction to do.
I think you can do it like this, without any system, in question.pstpl:
replace
Code:
<span class="asterisk">{QUESTION_MANDATORY}</span><span class="qnumcode">{QUESTION_NUMBER} {QUESTION_CODE} </span>{QUESTION_TEXT}<br /><span class="questionhelp">{QUESTION_HELP}</span>
Code:
{if(trim(QUESTION_TEXT)!="","<span class='asterisk'>"+QUESTION_MANDATORY+"</span><span class='qnumcode'>"+QUESTION_NUMBER+" "+QUESTION_CODE+" </span>"+QUESTION_TEXT+"<br /><span class='questionhelp'>"+QUESTION_HELP+"</span>","")}
Maybe some correction to do.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
9 years 10 months ago - 9 years 10 months ago #109324
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Hiding the main question of array type questions
Good tip Denis but I think that will still leave the row visible with some padding.
Another solution would be to set up your survey to use JavaScript and add this to the source of the question text:
.
Another solution would be to set up your survey to use JavaScript and add this to the source of the question text:
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { $('#question{QID} td.be').closest('tr').hide(); }); </script>
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 10 months ago by tpartner.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
9 years 10 months ago - 9 years 10 months ago #109326
by DenisChenu
git.sondages.pro/?p=skeletonquest.git/.g...lob;f=question.pstpl
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Hiding the main question of array type questions
I use it a lot in SkeletonQuest but more for 'question help' then we can use padding on question help without any other javasript.tpartner wrote: Good tip Denis but I think that will still leave the row visible with some padding.
git.sondages.pro/?p=skeletonquest.git/.g...lob;f=question.pstpl
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 9 years 10 months ago by DenisChenu.
The topic has been locked.