r3 icon indicating copy to clipboard operation
r3 copied to clipboard

Check for "any field changed" or "unsaved changes" in frontend

Open TechInterMezzo opened this issue 6 months ago • 9 comments

Is it possible to check if there are any unsaved changes in a form? I am using a custom frontend function that shouldn't be invokable if there are any unsaved changes, because the backend function it calls uses the data from the database. app.record_save() seems to be async without a callback, so I can't use it to force saving the changes before calling the backend function. There could be a timing problem.

At the moment I am using form state conditions but to add every field one by one is very time consuming and easy to forget if new fields get added.

TechInterMezzo avatar Aug 01 '24 11:08 TechInterMezzo