Hello everybody.
First, sorry for the bad English (Google Translate).
I have a problem with required questions controlled by the body::esri:visible column on the web. What happens is that, when the condition is not satisfied, the obligation remains. This prevents the form from being submitted (because the required question was not answered) at the same time the question is not displayed (because the condition was not satisfied).
The test form illustrates this situation: if I say that I don't want to display the 'next question' (required and controlled by visible column), Survey123 gives an error when submitting. However, if I withdraw the requirement, the form is successfully submitted.
In all the posts and walkthroughs I've read, my understanding is that visible controls a question's visibility and calculations (and I agree with that). However, it doesn't make any sense for the question to remain mandatory even without being displayed, because this practically makes the use of this function unfeasible.
I would like to know if this is expected behavior from Survey123 Web or if there is anything that can be done to work around this situation.
Thank you all
Solved! Go to Solution.
First off, Google translate did an awesome job! English was flawless 😉
I know in using Survey123 Connect you can conditionally set a question as required if certain criteria is met. See this post for some more info. Hope that helps!
Thanks for raising the issue, and the issue you mentioned has been fixed on current prod environment. The required constraint will be ignored if the question is hidden using body::esri:visible.
Please test with the url parameter ?version=latest if version lock is used.
Thanks,
Ruth
First off, Google translate did an awesome job! English was flawless 😉
I know in using Survey123 Connect you can conditionally set a question as required if certain criteria is met. See this post for some more info. Hope that helps!
Google always saving us! 😂
I often use conditional binding on forms filled out in the field app, but I didn't know it worked on forms filled out on the web as well.
Thank you so much for this! I believe it will solve this problem.
Alternatively, you can also move your body::esri:visible expression to the relevant column and leave your question as required. If a question is not relevant, it will not be shown, its contents will be cleared, and the required and constraint expressions will be ignored.
This was fixed when published from connect in the past. Maybe it has not been fixed in the web yet?
@DougBrowning You are correct. This 'should' work in the web app. I logged an issue so this can be addressed in the future. In the meantime, the relevant workaround may do for @SMDSAdministrador
Yes, Ismael. I agree that, in general, the relevant solves most problems (as in the simplified test form I attached above). After all, if I don't need to calculate a value for the question, why use the visible column?! I completely agree.
However, some of our forms are a little more complex and a hidden question can be calculated automatically or not, in the same form (depending on previous conditions). Thus, only the relevant does not meet the needs. But good to know that for the future this will be fixed on the web as well.
For now, @Katie_Clark solution to using conditionality in the required column resolves the issue well.
Thank you all!
Thanks for raising the issue, and the issue you mentioned has been fixed on current prod environment. The required constraint will be ignored if the question is hidden using body::esri:visible.
Please test with the url parameter ?version=latest if version lock is used.
Thanks,
Ruth
Ruth, we've run some tests and the problem seems to have been resolved. The requirement is being ignored.
Thank you for that.
@SMDSAdministrador This seems to have come back in the 3.17 update that just came out. Can you test it again?
Here is mine breaking