diff --git a/packages/kit/src/runtime/app/forms.js b/packages/kit/src/runtime/app/forms.js index bdb4f0fa8321..ab53fabc593a 100644 --- a/packages/kit/src/runtime/app/forms.js +++ b/packages/kit/src/runtime/app/forms.js @@ -63,6 +63,9 @@ function clone(element) { * - redirects to the nearest error page in case of an unexpected error * * If you provide a custom function with a callback and want to use the default behavior, invoke `update` in your callback. + * It accepts an options object + * - `reset: false` if you don't want the `
` values to be reset after a successful submission + * - `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission * @template {Record | undefined} Success * @template {Record | undefined} Failure * @param {HTMLFormElement} form_element The form element diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index 237b3e3ff57e..746ccd59364c 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -2027,6 +2027,9 @@ declare module '$app/forms' { * - redirects to the nearest error page in case of an unexpected error * * If you provide a custom function with a callback and want to use the default behavior, invoke `update` in your callback. + * It accepts an options object + * - `reset: false` if you don't want the `` values to be reset after a successful submission + * - `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission * @param form_element The form element * @param submit Submit callback */