Type de bouton

More
3 months 31 minutes 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 Log in or Create an account to join the conversation.

LimeSurvey Partners
More
2 months 4 weeks ago - 2 months 4 weeks 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: 2 months 4 weeks ago by tpartner.
The following user(s) said Thank You: DenisChenu

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

More
2 months 4 weeks 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 Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!