Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required value can be left blank on finalization if cleared by calculate #633

Open
lognaturel opened this issue May 19, 2021 · 0 comments
Open

Comments

@lognaturel
Copy link
Member

Software versions

all

Problem description

Users sometimes put a calculate on a visible field in an attempt to have a dynamic default. That calculate is evaluated on form finalization, replacing any user-provided value. If the calculate evaluates to blank, the form successfully finalizes even if the field is required.

Steps to reproduce the problem

See getodk/collect#4566

Expected behavior

If a calculate clears a required value, the form should fail validation. This doesn't do a lot to help users identify their misuse of calculates because more often than not a calculate will produce a value. I'm still filing the issue because it points to something not quite right about the order things are evaluated in on finalization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant