List with comments - 2 questions

More
1 month 5 days ago #186561 by comep
Dear all
I have 2 questions regarding the list with comments question.

1. can I force the list with comments and to accept only numbers?
2. can I adjust the size of the comments box to a smaller one?

I have Lime survey version 2.72.5+171121 and a customized news_paper theme.

Thank you,


Comep

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

LimeSurvey Partners
More
1 month 5 days ago - 1 month 5 days ago #186582 by Joffm
Hi,
you talk about a list with comments?


You may use a webdeveloper tool which is included in all modern browsers to find the classes which are involved and how to change their values.
Here add something like this to the source code:
<style type="text/css">
textarea.form-control {
 
    height: 40px;  // values up to you
    width: 30%;
 
}
</style>


To accept only numbers you may validate the comment.




Read the manual here:
https://manual.limesurvey.org/Expression_Manager#Access_to_Variables
and
https://manual.limesurvey.org/Expression_Manager#Implemented_Functions

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 1 month 5 days ago by Joffm.

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

More
1 month 5 days ago #186598 by comep
Thank you.

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

More
2 weeks 6 days ago #187117 by haroldrio
Hi there.

I have a similar question about this one.
I am using Limesurvey 2.51.4 version

I have a list with comment question and I want the comment to accept only numbers.

Iam not really very techie about codes and I was able to find a snippet about changing the "Type your comments here"
<h4><strong>Current repayments</strong></h4>
 
<p>Frequency</p>
<script type="text/javascript" charset="utf-8">	
$(document).ready(function(){
 
 $('.list-with-comment p.comment label').text('Amount ($)');
 
  });
 
 
</script>


I tried using this snippet above and insert in my source code but it doesn't work
and the "type your comments here" appears again.

I am not sure where to paste the code so maybe that's what causing the error.

<style type="text/css">
textarea.form-control {
 
    height: 40px;  // values up to you
    width: 30%;
 
}
</style>


This is what I did
<h4><strong>Current repayments</strong></h4>
 
<p>Frequency</p>
<script type="text/javascript" charset="utf-8">	
$(document).ready(function(){
 
 $('.list-with-comment p.comment label').text('Amount ($)');
 
 <style type="text/css">
textarea.form-control {
 
    height: 40px;  // values up to you
    width: 30%;
 
}
</style>
 });
 
 
</script>

And what should be placed in the "values up to you" - I want them to key in any number



Thanks in advance

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!