The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How to insert a number beside the points

How to insert a number beside the points 2 years 1 month ago #59198

  • guislopes
  • guislopes's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hello folks.
I need to insert a number beside each answer point on the 'array' question type, I already tried limesurvey options but I got nothing more than a headache. Please, someone could help me? I would be very very thankful. :)
The figure explains better what I am trying to.


guislopes_2.png


guislopes_1.png




Thank you!!
Last Edit: 2 years 1 month ago by guislopes. Reason: the picture is not showing up still
The administrator has disabled public write access.

Re: How to insert a number beside the points 2 years 1 month ago #59212

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2858
  • Thank you received: 424
  • Karma: 244
Set up your survey to use JavaScript and place the following script in the source of the array question. Replace "QQ" with the array questtion ID.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
		// The array question ID
		var qID = QQ;
 
		// Insert a number beside each radio button
		$('#question'+qID+' table.question tbody').each(function(){
			$('td', this).each(function(i){
				$('<span>'+(i+1)+'</span>').appendTo(this);
			});
		});
 
	});
 
</script>
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 1 month ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: guislopes

Re: How to insert a number beside the points 2 years 1 month ago #59218

  • guislopes
  • guislopes's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hello Tony,

It worked great! THANK YOU VERY MUCH TONY! :laugh:

One more thing, if it is possible, how could I change the font and size of the numbers?
The administrator has disabled public write access.

Re: How to insert a number beside the points 2 years 1 month ago #59220

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2858
  • Thank you received: 424
  • Karma: 244
Something like this at the end of template.css (replace"QQ"):
#questionQQ  table.question tbody span {
	font-size: 1.3em;
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	color: #0000FF;
}
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 1 month ago by tpartner.
The administrator has disabled public write access.

Re: How to insert a number beside the points 2 years 1 month ago #59228

  • guislopes
  • guislopes's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hi Tony,

I did what you said but it did not work. To see if I did it correctly, the following picture is what I did. What may be happened?


guislopes_3.png


Thank you very much for the help!

Guilherme
The administrator has disabled public write access.

Re: How to insert a number beside the points 2 years 1 month ago #59229

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2858
  • Thank you received: 424
  • Karma: 244
That looks okay if the ID is correct. Did you clear your cache?

T.
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: guislopes

Re: How to insert a number beside the points 2 years 1 month ago #59231

  • guislopes
  • guislopes's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hi Tony,

You are right. I was a dummy :whistle:
My question is solved.

Thank you very very much! :woohoo:
The administrator has disabled public write access.

Re: How to insert a number beside the points 2 years 1 month ago #59232

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2858
  • Thank you received: 424
  • Karma: 244
:laugh:
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: DenisChenu, ITEd
Time to create page: 0.222 seconds
Donation Image