Delete all auto saved data.
await autoSaveService.deleteAllAutosaveData()
Delete saved data.
const formId = 1
const myKey = 'my-key'
await autoSaveService.deleteAutoSaveData(formId, myKey)
Get saved data.
const formId = 1
const myKey = 'my-key'
const prefillData = await autoSaveService.getAutoSaveData(formId, myKey)
if (prefillData) {
// Ask user if they would like to continue with this prefill data.
}
Get keys for autosave data.
const keys = await autoSaveService.getAutoSaveDataKeys()
if (keys.length) {
// Display keys to user
}
Create or update saved data.
const formId = 1
const myKey = 'my-key'
await autoSaveService.upsertAutoSaveData(formId, myKey, {
form: 'data',
goes: 'here',
})
Auto Save Service
Helper functions for handling data while user is completing form.