Welcome to the LimeSurvey Community Forum

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

limiting the filled number and adding %

  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #220516 by xiaomeng0603
limiting the filled number and adding % was created by xiaomeng0603
Hello

I use the Array(text) to edit the following table. Now I am wonder is it possible to make the two requirements come true?

First: Limit each filled number from 0 to 100. I found that if I used the “Maximum answers:100”, the table would be separate.
Second: Add the “%” in each cell. 

Thank you very much 
 

File Attachment:

File Name: limesurvey...ABLE.lsq
File Size:13 KB
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago #220540 by holch
Replied by holch on topic limiting the filled number and adding %
Please always provide LSS files here in the forum. I know it is a little bit more work for you, but it saves the helpers quite some time.

Unfortunately to use your lsq file we need to create a survey, then a group and hope, that we created it in the same base language as your LSQ file, because these files are language sensitive. Help us to help you.

But please only send the relevant part of the survey, not your whole survey. To do so, make a copy of your survey, delete everything that is unnecessary for this topic and then export it as LSS file and upload it here.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #220541 by xiaomeng0603
Replied by xiaomeng0603 on topic limiting the filled number and adding %
 

File Attachment:

File Name: limesurvey...ABLE.lss
File Size:25 KB
The topic has been locked.
  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #220543 by xiaomeng0603
Replied by xiaomeng0603 on topic limiting the filled number and adding %
Thanks for your suggestion, a submit the LSS again
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago #220546 by tpartner
Replied by tpartner on topic limiting the filled number and adding %
I don't know why you used a table in the question text for the array headers. This will not work on mobile devices.

You can use the subquestion validation to ensure a maximum value of 100:
 
 
Code:
this <= 100

This script in the question source will insert a suffix after all inputs:
 
 
Code:
<script type="text/javascript" data-author="Tony Partner">  
  $(document).on('ready pjax:scriptcomplete',function(){
    // Input suffix
    $('#question{QID} :text.form-control').after('<span class="inserted-suffix"> %</span>').css({
      'display': 'inline-block',
      'width': '80%'
    });
  });
</script>

 

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #220950 by xiaomeng0603
Replied by xiaomeng0603 on topic limiting the filled number and adding %
thank you. it works. we rediscuss this qustion and give up using array headers. thank you a lot
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose