Welcome to the LimeSurvey Community Forum

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

Align total multiple numeric entry

  • AntPIC
  • AntPIC's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 month 1 week ago #259372 by AntPIC
Align total multiple numeric entry was created by AntPIC
LimeSurvey Cloud Versione 6.4.12Greetings,
in a question with multiple numeric entry, with a total of 100%, how can I correctly align the row relating to the total and the remaining values? I tried managing the size of the text boxes but it doesn't align. How can I fix it easily? Thank you

 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #259423 by tpartner
Replied by tpartner on topic Align total multiple numeric entry
You neglected to tell us which survey theme you are using but if using Vanilla, you can add something like this to the question source. Adjust the width rule depending on your input with setting.

Code:
<style type="text/css" data-author="Tony Partner">
    #question{QID} .ls-group-dynamic {
        display: flex;
        margin: 0
    }
 
    #question{QID} .ls-group-dynamic .control-label {
        padding-left: calc(var(--bs-gutter-x)*.5);
        padding-right: calc(var(--bs-gutter-x)*.5);
    }
 
    #question{QID} .ls-group-dynamic .ls-input-group {
        width: 185px;
        padding-left: calc(var(--bs-gutter-x)*.5);
        padding-right: calc(var(--bs-gutter-x)*.5);
        text-align: right;
    }
 
    #question{QID} .ls-group-total .suffix-text {
        display: table-cell !important;
    }
</style>

 

Sample survey:  

File Attachment:

File Name: limesurvey...4-01.lss
File Size:31 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #259434 by DenisChenu
Replied by DenisChenu on topic Align total multiple numeric entry
Issue need to be reported :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

  • AntPIC
  • AntPIC's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 month 1 week ago #259452 by AntPIC
Replied by AntPIC on topic Align total multiple numeric entry
A thousand thanks. If possible, could I have some more guidance on where to paste the code? Do I have to go into the themes extension and then customize the CSS? Do I need to change some codes (e.g. question name)? How do I then recall the editing in the specific questions?
Forgive me so I can take this opportunity to learn the steps and become independent for other cases too. Thanks always

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #259455 by tpartner
Replied by tpartner on topic Align total multiple numeric entry
If you look at the supplied sample survey, you will find the CSS in the source of the question text.

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.

  • AntPIC
  • AntPIC's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 month 1 week ago #259456 by AntPIC
Replied by AntPIC on topic Align total multiple numeric entry
Thank you. Yes, seen. But where should I stick it? and what should I do after gluing it?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #259464 by Joffm
Replied by Joffm on topic Align total multiple numeric entry

Do I have to go into the themes extension and then customize the CSS? 

You may add it to the "custom.css" of your extended theme

Do I need to change some codes (e.g. question name)?

Why? You see that there is used the system variable {QID} which always returns the actual QuestionID.

and what should I do after gluing it?

Nothing.
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • AntPIC
  • AntPIC's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 month 1 week ago #259470 by AntPIC
Replied by AntPIC on topic Align total multiple numeric entry
I followed the instructions but when I copy the formula it gives me several errors in the custom css and therefore it doesn't work for me

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #259473 by tpartner
Replied by tpartner on topic Align total multiple numeric entry
Place the CSS in the question source - it is question-specific due to the variable input widths.

...or, just copy it from the sample survey.

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.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #259476 by Joffm
Replied by Joffm on topic Align total multiple numeric entry
It doesn't work because you also inserted the <style>tags.
This is a css file. So internally the entire file is surrounded by these tags.

The other "error" is because the editor doesn't know about the inserted ExpressionScript part.

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose