getodk / getodk/web-forms

Allow users to recover from xpath errors

Open
#883 6 comments 0 reactions 1 assignee Claimed by @garethbowen View on GitHub
Dominant language
TypeScript
Stars
38
Forks
22
PR merge metrics
No merged PRs in 30d

Description

When the xpath throws a validation error the web-forms UI displays the error in a dialog that is impossible to recover from without refreshing the form.

Image

We can't necessarily show an error beside the field because it may be that it's not shown to the user, or the xpath expression may reference several fields. Instead show an error at the top of the form, and disable submit. That way the user is not blocked from fixing the error, and not interrupted if they're in the process of providing valid data.

Also consider if throwing errors is the correct approach or if the API should instead return error objects.

There may be a common approach that can be used for [similar errors in the xforms-engine](https://github.com/getodk/web-forms/issues/297).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.