Conditionally set field to be readonly in Survey123

4075
7
Jump to solution
02-20-2020 06:47 PM
YuyingLi
New Contributor II

Hello,

I would like to set the fields read only based on the coniditions (the preivous choice)...Can I do that? Here is what I put the the read only column for the field:


if (${purpose}='inplementation', 'yes', '')

The purpose field is the dropdown - based on the selection, the other field (B) will either read only or editable.

But with the fomular, the field B becames read only no matter what the drop-down selction is.

Any suggestions?

Thanks,

Yuying

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi,

Is there a typo in your formula? 

if (${purpose}='inplementation', 'yes', '')

Easier to do it without the if i.e. in readonly:

${purpose} = 'implementation' or ${purpose} = ''

Cheers,

Chris

View solution in original post

7 Replies
by Anonymous User
Not applicable

Hi,

Is there a typo in your formula? 

if (${purpose}='inplementation', 'yes', '')

Easier to do it without the if i.e. in readonly:

${purpose} = 'implementation' or ${purpose} = ''

Cheers,

Chris

YuyingLi
New Contributor II

Yes – thanks! Works great!!

Yuying Li, GISP

D 858.712.8381 M 858.380.8024

hdrinc.com/follow-us<http://hdrinc.com/follow-us>

by Anonymous User
Not applicable

Glad to hear we could help Yuying.

Can you please mark the answer as correct.

Thanks, Chris

JamieKelly1
Occasional Contributor

Will this also work in the webform?  I tried and doesn't seem to work, maybe I am doing something wrong.

Edit:  Forgot to mention that it was working fine in the IOS app before I tried it out in the webform.

wilcow
by
Occasional Contributor

did you get an answer to this? I'm unable (so far) to set a Multiple Choice question to Read only

JackFanZhang
Occasional Contributor

As of Mar 2023, readonly still doesn't support formular on the web from... What a frustration. I hope the product manager understands their customers need an efficient form builder to build a form that behaves the same across the platforms (mobile and web).

LeilaJackson1
Occasional Contributor III

@JackFanZhang Agreed that this is really needed.