CareSet / DURC

DURC is reverse CRUD
MIT License
3 stars 2 forks source link

Cannot be "null" error should be handled client side #26

Open ftrotter opened 6 years ago

ftrotter commented 6 years ago

It is super frustrating to click "save" and then be told after posting the data "something_id cannot be null". Then clicking the back button and every select2 box has been forgotten...

There are two fixes for this, and we should do both of them.

First, when a something_id cannot be null, then client side checking should ensure that that form cannot be submitted without choosing something...

Second, when there is a server side rejection of data saving, and a back button needs to be pressed (this will happen after all, with custom data-saving code) the select2 values chosen should be "remembered" after the back button is clicked.

This is advanced functionality, but it would be lovely if this just worked.

-FT