Custom attributes default value

More
2 years 10 months ago #146990 by La_civette
Hi guys,

Is it possible to have a default value defined for survey participant custom attributes.

Here's why :

I must present a set of questions or another depending on a yes/no custom attribute. Easy to deal with when I mass load from a csv. Nevertheless what about a self registering participant ? Value is NULL and he will be presented with none of the question sets.

Am I wrong ?

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
2 years 10 months ago #146998 by La_civette
Hi,

Well I think I found a very dirty workaround.

Attributes values are defined in lime_tokens_XXXXXX table. I could define a defult valu for the field once initiated. Fine but not elegant at all

From this I have a suggestion of improvement :
Custom attributes are defined in the attributedescriptions field in the lime_surveys table.
For a specific survey it present as such :

{"attribute_1":{"description":"Blah","mandatory":"N","show_register":"N","cpdbmap":""},"attribute_2":{"description":"Blah","mandatory":"N","show_register":"N","cpdbmap":""}}

Wouldn't it be possible to add a default_value in that dictionary ?

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago #147007 by DenisChenu
Hi,

1. Make a feature request
2. Make a pull request

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #147306 by La_civette
Hi DenisChenu,

Sorry for late reply. Could you please be more specific on how to do this ?

Thx,

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #147382 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!