- Posts: 10
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Custom attributes default value
- La_civette
- Topic Author
- Offline
- New Member
Less
More
7 years 3 months ago #146990
by La_civette
Custom attributes default value was created 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 ?
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 ?
The topic has been locked.
- La_civette
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
7 years 3 months ago #146998
by La_civette
Replied by La_civette on topic Custom attributes default value
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 ?
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 ?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
7 years 3 months ago #147007
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 .
I don't answer to private message.
Replied by DenisChenu on topic Custom attributes default value
Hi,
1. Make a feature request
2. Make a pull request
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 .
I don't answer to private message.
The topic has been locked.
- La_civette
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
7 years 3 months ago #147306
by La_civette
Replied by La_civette on topic Custom attributes default value
Hi DenisChenu,
Sorry for late reply. Could you please be more specific on how to do this ?
Thx,
Sorry for late reply. Could you please be more specific on how to do this ?
Thx,
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
7 years 3 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 .
I don't answer to private message.
Replied by DenisChenu on topic Custom attributes default value
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 .
I don't answer to private message.
The topic has been locked.