From 0d521167b000bfed41c0f8c2cc3f843269af6dd2 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Mon, 31 Aug 2020 07:38:44 -0400 Subject: [PATCH] Update docs --- docs/components/form.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/form.md b/docs/components/form.md index 186ffb813..9ce45613b 100644 --- a/docs/components/form.md +++ b/docs/components/form.md @@ -6,7 +6,7 @@ Forms collect data that can easily be processed and sent to a server. All Shoelace components make use of a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to encapsulate markup, styles, and behavior. One caveat of this approach is that native `
` elements will not recognize Shoelace form controls. -This component solves that problem by serializing _both_ Shoelace form controls and native form controls when the form is submitted. The resulting form data is exposed in the `slSubmit` event as a [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) object. +This component solves that problem by serializing _both_ Shoelace form controls and native form controls when the form is submitted. The resulting form data is exposed in the `slSubmit` event as a [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) object in `event.detail.formData`. You can also find an array of form controls in `event.detail.formControls`. Shoelace forms don't make use of `action` and `method` attributes and they don't submit the same was as native forms. To handle submission, you need to listen for the `slSubmit` event as shown in the example below and make an XHR request with the resulting form data.