Skip to content

Detect and fail early when csv column names don't match usage #818

@garethbowen

Description

@garethbowen

Expected Behaviour

When using select_*_from_file the csv file must have column names that exactly match the expected values. By default these are name and label, which can be overridden using additional parameters. When they don't match exactly web forms should give a clear and useful error so it's corrected early.

Observed Behaviour

The form loads but behaves strangely, for example, selecting one option selects them all because they all have a null value. This is particularly hard to debug when it's a trailing space in the column name.

Reproduction Steps

Use the form in this forum post: https://forum.getodk.org/t/error-message-on-using-csv-as-an-external-list/58214

Screenshots or Videos

Environment

  • Browser version: all
  • OS: all
  • Web Forms version: latest

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions