ajouter des lignes sans réponses dans un tableau

More
3 months 3 weeks ago #192127 by lcathelineau
Bonjour, je suis novice en la matière et malgré mes recherches, je ne trouve pas de réponse à ma question.
Voilà, je voudrais réaliser un tableau avec lignes et colonnes.
Dans ces lignes je voudrais ajouter des textes sans réponses à cocher.
Je vous mets en pièce jointe ce que j'aimerai faire.
Mecri d'avance pour vos réponses.
Attachments:

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
3 months 3 weeks ago #192128 by Joffm
Bonjour,

<script type="text/javascript" charset="utf-8">		
	$(document).ready(function() {	
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Define the sub-heading text strings
		var subHeading1 = 'Mention systematique ...';
		var subHeading2 = 'Support utilisable';
 
		var columnsLength = $('tr.subquestion-list:eq(0) > *', thisQuestion).length;
 
		// Insert the new rows
		$('tr.subquestion-list:eq(0)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading1+'</th></tr>');
		$('tr.subquestion-list:eq(3)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading2+'</th></tr>');	
 
		// Fix up the row classes
		var rowClass = 1;
		$('table.subquestion-list tbody tr', thisQuestion).each(function(i) {
			if($(this).hasClass('sub-header-row')) {
				rowClass = 1
			}
			else {
				rowClass++;
				$(this).removeClass('array1 array2')
				if(rowClass % 2 == 0) {
					$(this).addClass('array2');
				}
				else {
					$(this).addClass('array1');
				}
			}
		});
	});
</script>
<style type="text/css">.sub-header-row { margin-bottom: 20px; } 
  .sub-header-row th { background-color: #eeeeee; color: #000000 !important; text-align: left; }
</style>


Example:

File Attachment:

File Name: limesurvey...1163.lss
File Size:30 KB


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

Moderators: Nickko

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!