Welcome to the LimeSurvey Community Forum

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

Accessing Custom Token attributes in survey

More
9 years 11 months ago #124651 by arunicbe
I have created couple of custom attributes in the token table. I want to show and store these values as part of the survey.

Is it possible to access the custom attribute values in the survey?
The topic has been locked.
More
9 years 11 months ago #124653 by tpartner
Please refer to the manual - Expression Manager, Access to variables - www.limesurvey.org/manual/Expression_Man...#Access_to_Variables

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: arunicbe
The topic has been locked.
More
9 years 11 months ago #124655 by gabrieljenik
Complementing TPARTNER, you could add equation questions, prefilled with the token attributes.

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
More
9 years 11 months ago #126401 by tvanover
Hi,

I added a custom attribute in the token table.
I made a hidden question of type 'equation', and in the field login - equation: I typed:
TOKEN:ATTRIBUTE_1

This stored the text 'TOKEN:ATTRIBUTE_1' in the response table.
I tried also with {TOKEN:ATTRIBUTE_1}, but then the field was empty.
I also tried with ={TOKEN:ATTRIBUTE_1}, then the field contained the character =

So what is the correct syntax to save that attribute in my response table?

thanks,
tom
The topic has been locked.
More
9 years 11 months ago #126428 by first
{TOKEN:ATTRIBUTE_1} works well . Please note that you would have to add it after clicking Source.



Survey Designer and Programmer
The topic has been locked.
More
9 years 11 months ago #126451 by tvanover
Thanks. I had entered the code in the wrong field. It wasn't clear to me that it had to be in the "question" field.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose