Skip to content

Edit form should preserve changes when there's an error #21

Description

@sburnett

What happens now: if the edit form doesn't validate (e.g., you forget to fill in one field), you get a new page with a very generic, unhelpful error message ("One for more fields were invalid.") and must click a button to try again. Once you click the button, all form fields are reverted to their unedited state.

What should happen: if the form doesn't validate, the form should be redisplayed with an error message at the top and brief markers (eg., an X) near each invalid field. The form's contents should exactly match before and after the invalid submission; you shouldn't discard changes.

There are standard techniques for doing this in Django. See https://docs.djangoproject.com/en/dev/topics/forms/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions