Hiding the main question of array type questions

Mehr
3 Jahre 1 Monat her #109274 von Foram
Foram erstellte das Thema Hiding the main question of array type questions
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 ?
Anhang:

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 1 Monat her #109275 von tpartner
tpartner antwortete auf das Thema: Hiding the main question of array type questions
LimeSurvey version?

Template being used?


.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 1 Monat her #109281 von Foram
Foram antwortete auf das Thema: 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.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 1 Monat her #109318 von DenisChenu
DenisChenu antwortete auf das Thema: Hiding the main question of array type questions
Hi,

I think you can do it like this, without any system, in question.pstpl:

replace
<span class="asterisk">{QUESTION_MANDATORY}</span><span class="qnumcode">{QUESTION_NUMBER} {QUESTION_CODE} </span>{QUESTION_TEXT}<br /><span class="questionhelp">{QUESTION_HELP}</span>
by
{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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 1 Monat her - 3 Jahre 1 Monat her #109324 von tpartner
tpartner antwortete auf das Thema: 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:

<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.
Letzte Änderung: 3 Jahre 1 Monat her von tpartner.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 1 Monat her - 3 Jahre 1 Monat her #109326 von DenisChenu
DenisChenu antwortete auf das Thema: Hiding the main question of array type questions

tpartner schrieb: Good tip Denis but I think that will still leave the row visible with some padding.

I use it a lot in SkeletonQuest but more for 'question help' then we can use padding on question help without any other javasript.

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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 3 Jahre 1 Monat her von DenisChenu.

Bitte Anmelden um der Konversation beizutretten.

Haben Sie schon bei unserer Kundenumfrage mitgemacht?

Verpassen Sie nicht Ihre Chance auf tolle Preise.

Klicken sie hier um teilzunehmen:

Jetzt starten

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten