Type de bouton

More
3 months 3 hours ago #191311 by daisybibi
Type de bouton was created by daisybibi
Bonjour,
J'ai deux petites questions
1 - J'aimerai pouvoir présenter une question à choix unique non pas avec des boutons radio mais avec des boutons de groupe (je ne suis pas certaine du terme) comme dans la question prédéfinie du genre. Est-ce possible ?
2 - Est-il possible de modifier les propositions de la question Genre ? Si oui, comment procéder ?
Merci

Please Iniciar sessão or Create an account to join the conversation.

LimeSurvey Partners
More
3 months 1 hour ago - 3 months 1 hour ago #191317 by tpartner
Replied by tpartner on topic Type de bouton
Please use English in this section of the forum.

1) If you want to use a Bootstrap Button group in a list radio, you can place the following script in the question source. Note, you should only use this for short answers as longer ones may not fit on small devices like phones.

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		var thisQuestion = $('#question{QID}');
 
		$('.answers-list', thisQuestion).removeClass('radio-list').css('padding', '15px'); 
 
		$('.answers-list ul:eq(0)', thisQuestion).removeClass('row col-sm-12 col-xs-12').addClass('list-unstyled btn-group').attr('data-toggle', 'buttons'); 
 
		$('li.answer-item', thisQuestion).removeClass('answer-item radio-item').addClass('button-item btn btn-primary');  
 
		$('input:radio:checked', thisQuestion).closest('li').addClass('active'); 
    });
</script>



Sample survey attached:

File Attachment:

File Name: limesurvey...1-19.lss
File Size:18 KB



2) Create your own list-radio question and use the workaround above.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:
Last edit: 3 months 1 hour ago by tpartner.
The following user(s) said Thank You: DenisChenu

Please Iniciar sessão or Create an account to join the conversation.

More
3 months 1 hour ago #191318 by daisybibi
Replied by daisybibi on topic Type de bouton
Thank you for you answer. I will try the solution you suggest.
Cheers

Please Iniciar sessão or Create an account to join the conversation.

Começar agora!

Basta criar a sua conta e comece a usar o LimeSurvey hoje mesmo.

Registar agora
Subscreva o nosso boletim informativo!

Iniciar sessão