Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Other-label before and after radiobutton

  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 6 months ago #232758 by Jmantysalo
Other-label before and after radiobutton was created by Jmantysalo
How can I make a question like this;

Do you...

( ) Aa
( ) Bbb
( ) Foo ___ bar

I.e. have "other" -option, but so that the custom text would be both before and after the text field?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #232826 by tpartner
Replied by tpartner on topic Other-label before and after radiobutton
Something like this in the "Other label":
 
 
Code:
Other <span class="inserted-other"></span> option

This script in the question source:

Code:
<script type="text/javascript" data-author="Tony Partner">
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Move the text input
    $('.inserted-other', thisQuestion).append($(':text', thisQuestion));
    });
</script>



Sample survey attached: 

File Attachment:

File Name: limesurvey...4(1).lss
File Size:46 KB

Cheers,
Tony Partner

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

Please Log in to join the conversation.

  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 6 months ago #233155 by Jmantysalo
Replied by Jmantysalo on topic Other-label before and after radiobutton
Ah, that was so simple. Thanks again!

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose