--- title: Form description: |- The form component wraps form controls and enables implicit submission, allowing users to submit from any input by pressing **Enter**. Use form to group related input fields and handle form submission through JavaScript event handlers. Unlike HTML forms, form doesn't automatically submit data using HTTP—you must register a `submit` event to process form data programmatically. For Shopify Functions configuration forms, use [function settings](/docs/api/checkout-ui-extensions/2026-01/polaris-web-components/forms/function-settings). api_version: 2026-01 api_name: checkout-ui-extensions source_url: html: https://shopify.dev/docs/api/checkout-ui-extensions/latest/polaris-web-components/forms/form md: https://shopify.dev/docs/api/checkout-ui-extensions/latest/polaris-web-components/forms/form.md --- # Form The form component wraps form controls and enables implicit submission, allowing users to submit from any input by pressing **Enter**. Use form to group related input fields and handle form submission through JavaScript event handlers. Unlike HTML forms, form doesn't automatically submit data using HTTP—you must register a `submit` event to process form data programmatically. For Shopify Functions configuration forms, use [function settings](https://shopify.dev/docs/api/checkout-ui-extensions/2026-01/polaris-web-components/forms/function-settings). ## Properties * **id** **string** A unique identifier for the element. ## Events Learn more about [registering events](https://shopify.dev/docs/api/checkout-ui-extensions/2026-01/using-polaris-components#event-handling). * **submit** **CallbackEventListener\** A callback that is run when the form is submitted. ### CallbackEventListener ```ts (EventListener & { (event: CallbackEvent & TData): void; }) | null ``` ### CallbackEvent ```ts TEvent & { currentTarget: HTMLElementTagNameMap[TTagName]; } ``` Examples ## Preview ![](https://cdn.shopify.com/shopifycloud/shopify-dev/production/assets/assets/images/templated-apis-screenshots/checkout-ui-extensions/2025-10/form-default-w0y2qghs.png) ### Examples * #### Code ##### Default ```html Submit ``` ## Best Practices * Wrap around all form input elements. * Forms can have only one submit button and it must be at the end of the form.