sweh / ajja

JavaScript library for simple creation of forms and display of collections
MIT License
2 stars 0 forks source link

Make autosave optional #25

Open sweh opened 8 years ago

sweh commented 8 years ago

Originally reported by: Florian Pilz (Bitbucket: florianpilz, GitHub: florianpilz)


Currently the form always uses autosave, thus you must adjust your model to not contain required fields to use gocept.jsform. This is not very programmer-friendly. We should also allow to disable autosave, thus a save button is used to submit the form.

The approach to use no autosave is very helpful when all options and values are given up front, rather relying on a JSON API on server side. Maybe we should render the save button automatically when autosave is disabled.


florianpilz commented 8 years ago

:+1: By default we should not use auto-saving, since most programmers are unfamiliar with this approach, hence making it more difficult to get started with the library. Besides, the real value of auto-saving must be build into the App from ground up, e.g. should notify the user of "drafts" in case of incomplete forms etc.

florianpilz commented 8 years ago

We should really push this enhancement forward. One of our clients had issues, since they are accustomed to the "save on send" approach. Also, we were not able to "quickly" show how this can be changed. I know it's possible, but it is not easy and you still need to avoid required fields in the model due to auto-validation.