I have a survey which has some required fields, the survey also has a number of repeaters and these repeaters also have required fields. The form has a multi select and each repeating option is relevant to the multi select. So if the user selects 3 items, lets say pipes, valves and hydrants, the user will get 3 repeating sections to populate. We are experiencing an issue where the required fields are enforced in the first repeater, but is not enforced in subsequent repeaters. In the first repeater, if all required fields are populated, the form can be submitted, if not, the form identifies the required field that needs populated. This holds true for all repeat occurrences within that first repeater. In the subsequent repeaters the required fields are not validated by the UI. What we are finding is that as long as the user has populated all the required fields in the main form and in the first repeating section, required fields that have not been populated in subsequent repeater sections are submitted by the form. I would expect the form to not submit and to warn the user that required fields have not been populated.
Has anyone else experienced this issue? I have uploaded the excel form document if anyone would like to take a look.
Thanks,
- Jake
Hi Jake,
There are long-standing known issues using required fields in repeats. We hope to fix them in a release in the near future.
Thanks for the info Mitchell. Please keep us posted when you believe the issues with required fields in repeaters is resolved.
Here Required Fields ignored in repeats · Issue #226 · Esri/Survey123Community · GitHub it sounds like the problem was solved but obviously it wasn't... (Having similar problems with required fields in repeats. It's working in Connect but not in the app...)
Just wanted to give a bump to this issue. We have approximately 25 surveys in use and our only gripe is that required fields inside of repeaters are not being enforced. Thanks for hearing out our concern and hopefully a fix is coming in the near future.
- Jake
Hi Jake. Thanks for sharing your survey. It really helps a lot having it to understand the problem. We need to look more closely into this and figure we can logically make this work. At this point, I am not clear that we can fix this behavior, without breaking other workflows. This scenario is a it tricky because the relevant statement is applied to the repeat... we need to think about this one.
Can I suggest that you set a default value for your PASS_FAIL select_ones? If you can do that, the survey behaves as you would expect:
On a different topic, it looks strange that one could submit a form without selecting at least one inspection type. May be you want to add a constraint to UG_INSPECTION_TYPE to ensure at least one option is checked? Something like count-selected(${UG_INSPECTION_TYPE})>0
Thank you for the recommendations Ismael. We will test the default values and let you know if that solution will work for us. Also, thanks for the recommendation on the inspection_type constraint using the 'count-selected' function.
- Jake
I would like to follow up on this issue as it relates to repeaters with required fields and the repeaters are exposed to the user based on the relevant answers to previous questions.
Unfortunately we did not find that using default values in all of the repeaters that meet the above criteria as a valid solution for our use case because we would have overhead in terms of managing the default values and checking for the default value presence to exclude them from downstream reporting.
The two main issues that we have encountered with repeaters that have required fields and the repeaters are exposed to the user based on relevant answers to previous questions. (version 1.9.24):
Hi Jake. Just wanted to drop you a note here to highlight that we are actively looking at this issue.
Hi Jake Matthys, this issue should now be addressed with version 1.10. Check announcement at https://community.esri.com/groups/survey123/blog/2016/12/20/international-human-solidarity-day-relea...