FeatureFuel
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.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests