Welcome to the LimeSurvey Community Forum

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

How to make a autocode question as read only?

  • BOBYJAMES
  • BOBYJAMES's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 11 months ago #216533 by BOBYJAMES
Hi,
we have 2 questions in a survey
1, What is your age?
Ans. 26
2, Age group (autocode age group)
Ans.
* below 20
* 20 - 25
*26 - 30
*31 - 35
*above 35

Here the answer of seconed question is autocode as 26-30, but still the user can edit this. How to set this question as read only status ?
Thanks in advance
Kindly please help...
The topic has been locked.
More
2 years 11 months ago - 2 years 11 months ago #216535 by jelo
What version of LimeSurvey is used? Since we don't know how the autocode question is implemented, it's not possible to provide a solution. Without any information I would try to hide the question via CSS.

forums.limesurvey.org/forum/can-i-do-thi...ith-relevance#155904

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 2 years 11 months ago by jelo.
The topic has been locked.
  • BOBYJAMES
  • BOBYJAMES's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 11 months ago #216538 by BOBYJAMES
Replied by BOBYJAMES on topic How to make a autocode question as read only?
Hi,
Lime survey version - Version 3.15.5+181115

Autocode is done by this way-

in Question validation equation: S2=if(S1.NAOK < 20, "1", if(S1.NAOK >= 20 && S1.NAOK <= 25, "2", if(S1.NAOK >= 26 && S1.NAOK <= 30, "3", if(S1.NAOK >= 31 && S1.NAOK <= 35, "4", if(S1.NAOK >= 36, "5"))))))

just need to set this question as read only..
Thanks in advance
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #216542 by Joffm
Hi,
if it is to be "readonly", why do you show it at all (as jelo)?
Here you only define some age brackets.

And if you really want to show his age bracket to the respondent, do it in a question of type "text display".

Two more things:

in Question validation equation: S2=if(S1.NAOK < 20, "1", if(S1.NAOK >= 20 && S1.NAOK <= 25, "2", if(S1.NAOK >= 26 && S1.NAOK <= 30, "3", if(S1.NAOK >= 31 && S1.NAOK <= 35, "4", if(S1.NAOK >= 36, "5"))))))

1. in Question validation equation? Usually you do this in a question of type "equation"

2. You do not understand the logic of the IF function quite well.
You see, all your ">=" parts are not necessary; because they are always TRUE; otherwise these parts were not reached.

S2=if(S1.NAOK < 20, "1", if(S1.NAOK <= 25, "2", if(S1.NAOK <= 30, "3", if(S1.NAOK <= 35, "4", "5")))) is sufficient.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • BOBYJAMES
  • BOBYJAMES's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 11 months ago #216544 by BOBYJAMES
Replied by BOBYJAMES on topic How to make a autocode question as read only?
Thank you joffm for the explanations
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose