Cancel button, reset form or go back?
I'm working on a project where there's a CRUD table, but the editing takes place in an individual page. In this editing page, if the user presses the cancel button, a modal pops up asking for confirmation before redirecting the user back to the CRUD table.
There's also a settings page where it's just a single form. In this case the cancel button works more like reset, where it clears the form instead since there's nowhere to return to.
Is it ok to have two behaviors for the same button?
Or should I just remove the latter's cancel button entirely?
I read that it's best not to have a reset button in case users lose information unwillingly, but would it be weird if some pages only had a save button and no cancel, while some have both?
Laycee last edited by
It's not a good practice to have different behaviours for actions that look similar to the user.
"Cancel" is a way for a user to "Exit" a process or action without making changes.
So your first application of the Cancel button is correct.
If your intended behaviour is to clear or reset a form, you can tell your users exactly that.
You can name the buttons "Clear Form" or "Reset Form".