Welcome to the LimeSurvey Community Forum

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

How can I use a different logo for each survey, but without changing de template

  • helviobrito
  • helviobrito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 9 months ago #110033 by helviobrito
Plase, try again. Now the template is right.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110051 by tpartner

But I had a doubt it the logo name with the survey ID solution wouldn't affect all previous surveys, as you said, hotch.

I made that suggestion before you said you had other surveys that you don't want affected.


If you want to insert a logo only for survey ID 181521, you can add this to the end of template.js. This will insert the defined image before your survey description.

Code:
$(document).ready(function(){
  // Image URL
  var imagePath = 'http://www.google.com/logos/2011/thai_elephant_day11-hp.jpg';
 
  // Insert the image
  if($('input#sid').val() == 181521) {
    $('td.survey-description').prepend('<img class="logo-image" src="'+imagePath+'" />');
  }
});


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • helviobrito
  • helviobrito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 9 months ago #110065 by helviobrito
Thanks, tpartner. I'll try this solution and report the result to you.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose