From bab61698cbdd9cb16016a8710b7c536c55b0dca6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 25 Nov 2022 13:34:25 +0000 Subject: [PATCH] Clear a create form block when submitted --- .../components/app/blocks/form/InnerFormBlock.svelte | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte b/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte index 79a40ba346..da5345e6ad 100644 --- a/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte +++ b/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte @@ -46,6 +46,17 @@ { "##eventHandlerType": "Close Side Panel", }, + // Clear a create form once submitted + ...(actionType !== "Create" + ? [] + : [ + { + "##eventHandlerType": "Clear Form", + parameters: { + componentId: formId, + }, + }, + ]), { "##eventHandlerType": "Navigate To", parameters: {