This proposal provides user-friendly XLSForm access to the remembering previously entered values feature. Implementation in
pyxform depends on a decision at Spec proposal: add first-load event to replace xforms-ready.
I propose adding a yes/no column to represent whether a particular question's value should default to the last saved value. For example:
If the column contains
yes for a particular question, that question's value will default to the last saved value.
As usual, the hardest part is naming. I think including the word "default" is helpful. This makes it clear that it's related to the existing
default column in that it means the client will show a value that can be edited by the surveyor (or not). Some other ideas:
An alternate approach would be to use the existing support for external instances and a more general
dynamic_default column. This would generate a
setvalue triggered on form load with whatever value is in the column. The form author could then enter something like
instance('__last-saved')/data/a in that column to get the desired behavior. I think it's too hard to use and explain and so the added flexibility isn't worth much.