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

Improve Error Display for Questionnaire Form #10658

Open
3 tasks
DraKen0009 opened this issue Feb 17, 2025 · 5 comments · May be fixed by #10735
Open
3 tasks

Improve Error Display for Questionnaire Form #10658

DraKen0009 opened this issue Feb 17, 2025 · 5 comments · May be fixed by #10735
Assignees
Labels
needs-triage question Further information is requested

Comments

@DraKen0009
Copy link

Issue Description

Currently, when creating a new questionnaire without inputting data, errors are displayed as three separate toast messages, making it unclear which field needs correction.

Steps to Reproduce

  1. Visit /questionnaire.
  2. "Create New Questionnaire"without entering any data.
  3. See three separate toast messages instead of inline field errors.

Expected Behavior

  • Show a toast notification only for general form failure (Failed to create questionnaire).
  • Add basic validations on frontend and show inline error messages for specific field errors.
  • Highlight invalid fields in red.

Screenshot

Image

Acceptance Criteria

  • Toast notification only for form failure.
  • Inline field errors for organizations & slug.
  • Red highlight on invalid fields.
@AdityaJ2305
Copy link
Contributor

Hey @DraKen0009 , I would like to work on this issue

@tellmeY18 tellmeY18 moved this from Triage to In Progress in Care Feb 17, 2025
@AdityaJ2305
Copy link
Contributor

@DraKen0009 , I just checked it and other than "Failed to create Questionnaire" the two errors are being thrown by backend. Am I missing anything ? 🤔 it is because that PR is not merged yet ?

@github-actions github-actions bot added needs-triage question Further information is requested labels Feb 17, 2025
@Harsh-D-2004
Copy link

Harsh-D-2004 commented Feb 17, 2025

Hey i already raised this issue earlier
@DraKen0009

Issue : #10654

@DraKen0009
Copy link
Author

DraKen0009 commented Feb 17, 2025

We can have validations on fronted as well to avoid sending unnecessary request to backend for trivial validations.
eg -

  1. Slug should not be empty and should be within range of 5-25 char
  2. atleast an organization should be selected.
  3. Name should not be an empty string

@Harsh-D-2004
Copy link

@DraKen0009 Thankyou man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage question Further information is requested
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants