Welcome to the LimeSurvey Community Forum

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

Multiple numerical input with different suffixes

More
7 years 4 months ago #185845 by SherriChen
Hi,

I am working on LS 3.x. I have a multiple numerical input question which contains many subquestions. I only want to add suffixes for two of the subquestions.
For example,
SQ001: ____
SQ002: ____
SQ003: ____%
SQ004: ____
SQ005: ____%

Thank you very much for your help!
The topic has been locked.
More
7 years 4 months ago #185890 by tpartner
Enable the suffixes in the question settings and add a script like this to the question source to remove them in certain rows.

Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ $('#question{QID} .suffix-text:eq(0)').html(''); // Row 1 $('#question{QID} .suffix-text:eq(1)').html(''); // Row 2 $('#question{QID} .suffix-text:eq(3)').html(''); // Row 4 $('#question{QID} .suffix-text').css('width', '10px'); }); </script>

Sample survey attached:

File Attachment:

File Name: limesurvey...6-21.lss
File Size:18.88 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 4 months ago #185894 by SherriChen
Thank you very much! It really works great!
The topic has been locked.
Moderators: tpartner, holch

Lime-years ahead

Online-surveys for every purse and purpose