--- url: /reference/items/Frame/js-api/frame-form.md --- # FrameForm The `FrameForm` component extends the [abstract `AbstractFrameTrigger` component](./abstract-frame-trigger.md) and inherits from its APIs. It will trigger a request on its parent [`Frame` component](./frame.md) when its root `
` element is submitted, if the target attribute of the form is not `_blank`. ## Getters ### `method` * Return: `'post' | 'get'` * Default: the `method` attribute of the `` used as root element ### `url` * Return: `URL` * Default: the `action` attribute with the form data as URL parameters if the [`method`](#method) is `get` ### `requestInit` * Return: `RequestInit` * Default: the parent `requestInit` with additionnal headers from the [`headers[]` refs](#headers) and the form data as body if the [`method`](#method) is `post` ## Refs ### `headers[]` * Type: `HTMLInputElement[]` The `headers[]` refs add additional headers to the request with `` elements. The `data-name` attribute specifies the name of the header and avoids adding the header to the form data. ```html
``` The example above will add a `x-my-token: some-not-sensible-token` header to the triggered request.