Home arrow Support arrow Forums
LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:[done (?)] Identifying groups of respondents (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Re:[done (?)] Identifying groups of respondents
#13031
ITEd (Moderator)
LimeSurvey Team
Posts: 376
graphgraph
User Offline Click here to see the profile of this user
Re:[done (?)] Identifying groups of respondents 8 Months, 1 Week ago Karma: 10  
Mazi, my Javascript isn't really up to a good demonstration to solve this very particular and unusual need. It would be more useful IMHO to elaborate the principle in the tokens section of the manual a little, eg.


If your survey is NOT anonymous, the following field names are available to insert token data in survey text and Javascript:
[table of fieldnames here]

For example, if Attribute 1 contains either 'worker' or 'boss', one could personalise a question:
Hello {TOKEN:FIRSTNAME}, what do you as a {TOKEN:ATTRIBUTE_1} think about your [script]if {TOKEN:ATTRIBUTE_1}='worker' then write 'bosses' else write 'workers'[/script]?

In an anonymous survey these field names are not available because the tokens table is dissociated from the survey.
(Changes in bold.)

If this is a useful explanation how one might use these fieldnames, then people can come up with all sorts of creative ways to exploit them. What do you think? Feel free to improve ...

Regards.
 
Logged Logged  
  The administrator has disabled public write access.
#13065
Mazi (Moderator)
Moderator Lime
Posts: 3514
graph
User Online Now Click here to see the profile of this user
Re:[done (?)] Identifying groups of respondents 8 Months ago Karma: 28  
Sounds great. You are absolutely right: we need some more documentation on tokens and what can be done by using placeholders. Your instructions are great, can you add this to the wiki?!
 
Logged Logged  
 
Best regards,
Mazi
______________________
Need help? I can: set up Limesurvey for you / create your survey / implement additional features / design your template / offer premium support -> Contact.
  The administrator has disabled public write access.
#13322
ITEd (Moderator)
LimeSurvey Team
Posts: 376
graphgraph
User Offline Click here to see the profile of this user
Re:[done (?)] Identifying groups of respondents 7 Months, 4 Weeks ago Karma: 10  
By chance I found that some explanation was in the Adding a Question section of the manual. On the Tokens page I added a mention of script use and a link to examples in the Adding A Question page (but couldn't figure out how to link to the proper page section), where I added a rough scripting example.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top