How can web form repeats be made truly read-only (disabling add/delete capability)

241
3
Jump to solution
02-29-2024 09:47 AM
JosephRhodes2
Occasional Contributor II

We are attempting to design a survey to be accessed via web form that allows review of survey records previously submitted from the field. To do this, I've created two surveys, one for field collection via the mobile app, and a second one that points to the same feature service using the submission URL parameter, with all fields set to read only with the exception of a few additional fields for entering review information.

This works fine, except that the repeats are still editable in the sense that they can be deleted or added using the buttons in the web form:

JosephRhodes2_0-1709228586859.png

We can imperfectly get around accidental additions by making the fields in the repeat required and read-only (so it won't let them submit), but it seems that reviewers are still able to delete records from the repeat using the trash can button.

I've tried setting the [begin repeat] line to read-only, and have also tried setting the [bind::esri:parameters] column on the [begin repeat] line to allowUpdates=false and allowAdds=false, and neither seems to have any effect.

Is there any way to allow the repeats to be shown on the web form but not allow them to be added to or deleted?

0 Kudos
1 Solution

Accepted Solutions
TylerGraham2
Occasional Contributor

Since it sounds like the web form version isn't for creating new records you might consider making a view layer of the hosted feature service with editing set to only allow Update.  Then point the web form at that view layer instead of the original feature service.  

View solution in original post

3 Replies
TylerGraham2
Occasional Contributor

Since it sounds like the web form version isn't for creating new records you might consider making a view layer of the hosted feature service with editing set to only allow Update.  Then point the web form at that view layer instead of the original feature service.  

JosephRhodes2
Occasional Contributor II

Hi Tyler - good solution, thanks. The buttons still show on the form, but it gives an error on submission if you try to add or delete a related record.

0 Kudos
SMH-Rio
New Contributor III

Another approach would be to define a repeat count on this repeat, from a previous question "How many repeats do you want to insert", for example. And this question would be read-only in edit mode.

In this case, the add and delete buttons do not appear to the user.

0 Kudos