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:
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?
Solved! Go to Solution.
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.
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.
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.
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.