Accueil
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: 302
graphgraph
User Offline Click here to see the profile of this user
Re:[done (?)] Identifying groups of respondents 5 Months ago Karma: 7  
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: 2760
graph
User Offline Click here to see the profile of this user
Re:[done (?)] Identifying groups of respondents 5 Months ago Karma: 19  
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  
 
Beste Grüße/Best regards,
Mazi
______________________
You can support Limesurvey, too!
  The administrator has disabled public write access.
#13322
ITEd (Moderator)
LimeSurvey Team
Posts: 302
graphgraph
User Offline Click here to see the profile of this user
Re:[done (?)] Identifying groups of respondents 4 Months, 3 Weeks ago Karma: 7  
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