Select to view content in your preferred language

Disable editing of specific sections for Survey123 forms embedded in dashboard

926
5
Jump to solution
01-19-2022 04:18 PM
JohnMedema
New Contributor III

Hello, I have several embedded survey123 forms within a dashboard. I want to disable editing for certain fields/groups, or make them view only.  Are there any URL parameters that can accomplish this? 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Tiff
by
Occasional Contributor III

Hi @jcarlson, thanks for this! Does this workaround require disable_editing to be a field, or can it work with a note? I am guessing the former as it's not currently working for me.

View solution in original post

5 Replies
IsmaelChivite
Esri Notable Contributor

Hi. You cannot us URL parameters to make a specific question read-only. You could hide it, but not make it read-only. You may need to publish a new dashboard-specific version of your survey where some fields are read-only.

JohnMedema
New Contributor III

Do you have any suggestions on utilizing an expression in the readonly column? e.g. a select_one ('yes' or 'no') question becomes readonly after the survey question has been submitted with a 'yes' or 'no' answer?

0 Kudos
jcarlson
MVP Esteemed Contributor

I've actually done this before, and there's a simple workaround for it. Add a throwaway question in your XLS form that isn't tied to a field, call it "disable_editing" or something.

Then, in the field(s) you want to disable editing for, put the expression "${disable_editing} = 'true'" into the readonly column.

In your embed URL, just use the field URL parameter to set that field to "true".

...?field:disable_editing=true

 

- Josh Carlson
Kendall County GIS
JohnMedema
New Contributor III
Hello and thank you for responding Jcarlson.
I have added a generic question in the survey
| type name label
| text disable_editing disable_editing
I also chose to hide that question.
In the read only column added the ${disable_editing}='true'
Then in the embedded survey URL appended ...&?field:disable_editing=true
I tested this on a single question and did not successfully disable the editing. Any suggestions?
Tiff
by
Occasional Contributor III

Hi @jcarlson, thanks for this! Does this workaround require disable_editing to be a field, or can it work with a note? I am guessing the former as it's not currently working for me.