Welcome, Guest
Username: Password: Remember me

TOPIC: Pre-populating answers in a list question with token attributes

Pre-populating answers in a list question with token attributes 2 years 5 months ago #76700

  • tacman1123
  • tacman1123's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 125
  • Karma: 1
I'm sending a candidate questionnaire, and want to confirm their phone number, ward and party. With the phone number, it's easy, I set up a token attribute and use the default answer of {TOKEN:ATTRIBUTE_1}

But if my attribute 2 is Party and is D/R/I, and I have a list of Democrat, Republican and Independent, when it comes to default answers it lists them, but really I want to set it to a token value. Is this possible with 1.92?

Love this new feature, it's one of my favorites in 1.92.

Tac
The administrator has disabled public write access.

Re: Pre-populating answers in a list question with token attributes 2 years 5 months ago #76703

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Tac-

Not clear what you're asking. You want the default answer for your list to be {TOKEN:ATTRIBUTE_2}, and the coded values are D/R/I, but the display values are Democrat/Republican/Independent? If so, that should work fine - just use {TOKEN:ATTRIBUTE_2} as the default value. Each of the List question types supports default values, so have {TOKEN:ATTRIBUTE_2} be the coded value, not the display value; and you'll see the proper display value.

/Tom
The administrator has disabled public write access.

Re: Pre-populating answers in a list question with token attributes 2 years 5 months ago #76706

  • tacman1123
  • tacman1123's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 125
  • Karma: 1
I don't see where to indicate that. This is the default screen for a radio list:

easycaptures.com/fs/uploaded/475/5861607005.png

How do I indicate which one I want based on a token value?

Tac
The administrator has disabled public write access.

Re: Pre-populating answers in a list question with token attributes 2 years 5 months ago #76707

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Good point. If you can get {TOKEN:ATTRIBUTE_2} into into the database questions.default field, it will work.

So, someone (hint) needs to extend the user interface to give people the option to enter an equation - perhaps in addition to the <no default value>, one could have <other>, which would open a text entry box into which users could enter an equation.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.111 seconds
Donation Image