Form Autosave Safari Extension saves the contents of web forms as you fill them out. If something goes wrong before you can submit a form, you can autofill it with the last saved contents using a context menu command.
Most login forms are excluded, and password fields are not saved.