Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How can i set default value for Dropdown ?

  • mikezhangsky
  • mikezhangsky's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #135417 by mikezhangsky
How can i set default value for Dropdown ? was created by mikezhangsky
I have a question with array text using label .
I set dropdown for the question.
How can i set the default values for dropdown , I did not find any where to set it ,and the default value i "Please choose..."
Attachments:
The topic has been locked.
More
7 years 10 months ago #135421 by Ben_V
Replied by Ben_V on topic How can i set default value for Dropdown ?
for multiples dropdown in an array as shown in your pic, i suppose the only way is to use javascript to add a "selected" attribute to the items depending on their IDs or other selectors

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • mikezhangsky
  • mikezhangsky's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #135438 by mikezhangsky
Replied by mikezhangsky on topic How can i set default value for Dropdown ?
thank you very much ,
Would you give me an javascript example for me ?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #135443 by tpartner
Replied by tpartner on topic How can i set default value for Dropdown ?
LimeSurvey version? Question type?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mikezhangsky
  • mikezhangsky's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #135505 by mikezhangsky
Replied by mikezhangsky on topic How can i set default value for Dropdown ?
The version of LimeSurvey is 2.05 ,questtion type is array text , and i use the arrayTextAdapt for Limesurvey.
and thank you very much ~
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
7 years 10 months ago #135522 by Mazi
Please post a link to a short, activated sample survey.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • mikezhangsky
  • mikezhangsky's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #135559 by mikezhangsky
Replied by mikezhangsky on topic How can i set default value for Dropdown ?
I set a question use array text ,and use the plugin arrayTextAdapt .
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #135759 by DenisChenu
Replied by DenisChenu on topic How can i set default value for Dropdown ?

mikezhangsky wrote: I set a question use array text ,and use the plugin arrayTextAdapt .

With or without this plugin.

A possible solution can be :
At start of survey : Use Equation to set a value example {QCODE_Y1_X1=if(is_empty(QCODE_Y1_X1.NAOK),"A1",QCODE_Y1_X1.NAOK)}

See attached lss file

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.
  • mikezhangsky
  • mikezhangsky's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #135768 by mikezhangsky
Replied by mikezhangsky on topic How can i set default value for Dropdown ?
thank you for your help , it works~~
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose