5
Autosave Form Progress to localStorage
Source: directus/directus#24792 · opened by @FutureBuddha
Summary Implement an automatic form progress saving feature in Directus that periodically stores modified field values to the browser's localStorage. This prevents data loss when users experience internet connectivity issues or accidentally close their browser, allowing them to resume form completion from where they left off. Basic Example // Example implementation approach import { useLocalStorage } from '@directus/composables'; export default { setup() { const { item, saving } = useItem(); const formState = ref({}); // Initialize localStorage handler with unique key based on collection and item ID const storageKey = directus-form-${collection}-${id || 'new'}; const { value: savedState, remove: clearSavedState } = useLocalStorage( storageKey, null ); // On component mount, check for saved state onMounted(() => { if (savedState.value) { // Prompt user to restore pr…
No pledges yet. Be the first to back this.
Comments
Similar requests
Persist columns size in O2M table
3 votes · 0 comments
Export Collection Items in .xlsx Format
46 votes · 0 comments
Sharable forms for adding content to collections
61 votes · 0 comments
Additional Form/Field Layout Options
45 votes · 0 comments
Allow interfaces to trigger item saves
5 votes · 0 comments
No comments yet.