Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Adding a default value for Text (shor, medium and long), date and combos

Adding a default value for Text (shor, medium and long), date and combos 5 years 6 months ago #60948

  • sethplate
  • sethplate's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
Hi guys,

I needed to add a default value to text, date and combos in a survey a I made. The combos already have a possible default value but I needed to bind the default value to a token entry.

My need was for people to confirm their personal info, and the "old" info was in token attributes. I used the implemented mechanism and just extended it to these other questions types.
  • In the questions it can have a {TOKEN:ATTRIBUTE_1}.
  • In the date, the same.
  • In the combos, I added all the token fields to the available options.

Using this approach, I don't have to write javascript code binded to a specific survey/question ID, and I provide the survey administrator (non IT person) the possibility to bind default values to these questions types.

My question is: Is this interesting to you? Do you see value in adding this to the code?

Note: This was developed in 1.90.

Best regards,
Tiago Lopes

I'm not sure this is the right forum to post this. If not, please let me know and I'll change it.
The administrator has disabled public write access.
Time to create page: 0.188 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form