-
Notifications
You must be signed in to change notification settings - Fork 3
Form Save UX
Stephen Haberman edited this page Apr 3, 2025
·
10 revisions
When should our Save buttons enable/disable?
The form logic has access to:
- Is the form dirty?
- Is the form valid?
- Are there "hidden errors" (i.e. Last Name is required, but the user hasn't touched the Last Name field yet)
- Are there "visible errors" (i.e. First Name is required, and we're showing the
Requirederror message)
- Is the entity new?
- Or being duplicated
- a) Enable whenever
dirty(or new), even if invalid (current behavior)- Pro: Only enables when changes to save
- Pro: Allows the user to hit submit early & show the invisible errors
- Con: Shows enabled even when they are visible & invisible validation errors
- b) Enable when
valid- Pro: Simple, what many BP forms due today (copy/pasted)
- Con: Shows enabled when there are no changes (clicking save won't do anything)
- Con: Because we only show errors on touched fields, the user might see "Save is disabled" even when there are no red errors on the screen (although they would probably see
*for required fields)
- c) Enable whenever
valid && dirty- Con: Stays disabled when there is a "hidden error", potentially confusing the user about "why is this save disabled"
- A new form (creating author), that is totally empty
- Currently we do not show validation errors until fields are touched, so likely invalid but no errors showing
- If we show "Submit" enabled, clicking Submit "touches" all the fields, and you see the errors
- An edit form (editing author) with no changes
- Initially
dirty=false&valid=true-> Save is disabled
- A duplicate from (creating new author from existing)
-
dirty=false(technically user hasn't changed anything) valid=true