I am trying to apply an attribute value to a template to dynamically display an image based on the value for that particular person. I have the attribute setup as "customer_name" and for a specific person i have given them the value of "test". I have uploaded test.png through the template editor. When I try any of the following in my template it is coming back as an undefined variable. Am I missing something?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. I don't answer to private message.
Hey Denis thanks for the reply, that was helpful. I understand the correct syntax now, but for some reason it is outputting all of my values at empty. The below still result in "" even though they are all populated on the token.
TOKEN: can be used only if
- There are a existing token (preview don't work)
- Survey is NOT anonymous
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. I don't answer to private message.
Hmm, I do have tokens and the survey isn't anonymous and I'm actually clicking a link to take the survey. Do you have any other ideas why this wouldn't be working? It seems to be recognizing the attribute, but just not pulling the value. I can provide screenshots if necessary.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. I don't answer to private message.
Any help would greatly be appreciate, I seem to be stuck. When clicking the link to take the survey the source is shown as
"<img src="/limesurvey/upload/templates/.png" />" Meaning that {TOKEN:ATTRIBUTE_16} is coming in as empty.
As Dennis says, it is hard for us to help with a problem that we can't reproduce. The version you are using is quite old already and in those 2 years Limesurvey has changed quite a bit. It is possible that this is a bug or problem in this specific version.
You could try and upload an example to the demo version here on limesurvey.org and see if your code works here, to rule out a problem with your installation / version.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Thanks for the idea Holch. I just tried with the demo version and it still doesn't appear to be working. Can you take a look at Survey:578422 which I used to test out adding an attribute and then making it appear in the 'copy_of_default' template under welcome.pstpl via {TOKEN:attribute_1}.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. I don't answer to private message.
Oh ok thank you I was able to fix it and it is now working in the demo version. It is still not working on my version so there must have been a bug in, Version 2.00+ Build 130802.