# Form

This component has two usage patterns.

The behavior varies depending on whether the 'action' is specified in the attribute.

The first is when 'action' is set, executing form actions like a typical HTML Form. The submit function is performed according to the Form method (GET, POST). The response of this submit is set as the data for this component, performing data binding.

The second is when 'action' is not set, used for the purpose of constructing form data. The form object is built with inputs within the form, and this form object is set as the data for this component, performing data binding.

Understand and use these two usage patterns appropriately.

## Properties

- **method**

  - **type**: select
  - **description**: Form submission method (GET or POST)
  - **options**:
    - `GET`
    - `POST`
  - **example**: `method: "POST"`

- **action**

  - **type**: string
  - **description**: URL to which the form is submitted
  - **example**: `action: "https://example.com/submit"`

- **period**

  - **type**: number
  - **description**: Period for automatic form submission (in seconds)
  - **example**: `period: 60`

- **name**

  - **type**: string
  - **description**: Form name
  - **example**: `name: "userForm"`

- **authorization**

  - **type**: string
  - **description**: Authorization token used during form submission
  - **example**: `authorization: "Bearer token"`

- **format**

  - **type**: select
  - **description**: Format of the data received from the server after form submission
  - **options**:
    - `JSON`
    - `XML`
    - `TEXT`
  - **example**: `format: "JSON"`

- **content-type**

  - **type**: select
  - **description**: Content type of the form
  - **options**:
    - `JSON`: `application/json`
    - `FORM`: `application/x-www-form-urlencoded`
    - `TEXT`: `text/plain`
  - **example**: `content-type: "application/json"`

- **round**

  - **type**: number
  - **description**: Border radius of the form (px)
  - **example**: `round: 5`

- **with-credentials**

  - **type**: checkbox
  - **description**: Whether to include credentials during form submission
  - **example**: `with-credentials: true`

- **submit-on-load**

  - **type**: checkbox
  - **description**: Whether to automatically submit the form when loaded
  - **example**: `submit-on-load: true`

- **set-data-on-change**

  - **type**: checkbox
  - **description**: Whether to automatically set data when form values change
  - **example**: `set-data-on-change: true`

- **debug**

  - **type**: checkbox
  - **description**: Whether to enable debug mode (outputs form submission results to console)
  - **example**: `debug: true`

```

```
