QuestionID as Variable

More
5 years 1 month ago - 5 years 1 month ago #78013 by getter
getter created the topic: QuestionID as Variable
We developed for us an template whis is common enough to do (actually) all surveys. We want to use it for a lot of purposes, but always change the logo. For this it would bi nice to have the SurveyID as a variable, so we could insert the logo by using <img src={SurveyID}.jpg/>

This is our workarround
<script type="text/javascript" charset="utf-8">
$(document).ready(function () { 
  var sID = document.getElementById("sid"); 
  $('#customLogo').append('<img src="'+sID.value+'.jpg"/>');
});
</script>
Last Edit: 5 years 1 month ago by getter.

Please Log in to join the conversation.

More
5 years 1 month ago #78017 by tpartner
tpartner replied the topic: QuestionID as Variable
You can use the {SID} placeholder in the template .pstpl file. Something like:
<div id="customLogo">
	<img src="{TEMPLATEURL}logoImage-{SID}.png">
<div>

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.

More
5 years 1 month ago #78034 by Mazi
Mazi replied the topic: QuestionID as Variable

tpartner wrote: You can use the {SID} placeholder in the template .pstpl file. Something like:

<div id="customLogo">
	<img src="{TEMPLATEURL}logoImage-{SID}.png">
<div>

Great solution, I added it at: docs.limesurvey.org/The+template+editor#...with_different_logos


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now