# Forms Block

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2FyrkYIeXWSlGulT0t1Y3J%2Fimage.png?alt=media&#x26;token=148c5233-e10d-4299-afcf-2f7b28a5cb93" alt=""><figcaption></figcaption></figure>

This block receives or fills in the value of the form element (input, select, checkbox, and radio).

Please note:

This block cannot function without an active tab. For this reason, use the Active Tab block or the New Tab block before using this one.

Below is a screenshot of the block settings.

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2FWB4ROhk8y8hLjOuESsW8%2Fimage.png?alt=media&#x26;token=32c3e363-b2f0-415e-b9b6-5d2d5a2a8a9b" alt=""><figcaption></figcaption></figure>

The block has two modes of operation: CSS Selector or XPatch. In the first mode, the block must receive a css selector of the page element for its operation. In the second mode, the block receives the Xpath of the element. To get a selector, you can use the Element selector tool of the Goless extension.

* Settings of the **Selector options** group:

1. **Multiple.** Multiple element selection.
2. **Mark element.** The item will not be selected if it was selected earlier.
3. **Wait for selector.** Wait for the selector to be received. When you select this element, you can enter the timeout of the selector.

If you need to get information from an element, select the **Get form value** setting.

### Get form value <a href="#get-form-value" id="get-form-value"></a>

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2FcX4RiUKuMFIaJ3R9AuEq%2Fimage.png?alt=media&#x26;token=04cb9ef9-b731-4923-b6f6-1b3a834bfcd4" alt=""><figcaption></figcaption></figure>

Receive the value of the form element. After selecting a setting, two settings are available to save the received data:

* **Assign to variable.** Set the value of a variable or not.
* **Insert to table.** Assign a value to a table column. This setting is usually used in cycles where the rows of the internal workflow table are filled in sequentially.

### Form type <a href="#form-type" id="form-type"></a>

To get data from an html page element, select the element type in the Form type setting. A screenshot with configuration options is shown below:

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2FH7VNOg3lMlvf4lZ2kUao%2Fimage.png?alt=media&#x26;token=8a376131-2d0e-449e-a747-e80facd4b22d" alt=""><figcaption></figcaption></figure>

* **Text field.** A text field to fill in. Settings for this type:

1. **Value.** The value of a text field element such as  and , or an element with a contenteditable attribute.
2. **Clear form value.** This removes the value from the text field element before inserting the new one.
3. **Typing delay.** This adds a time limit when inserting each character of the value. When set to 0, it is inserted immediately.

* **Select.** A selection item from a list of values. Settings for this type:

1. **Value.** The value for the element. To select a specific option for a selection item, you can enter the value of the option you want to select into it. The parameter value can be found using the Element Selector tool or Chrome DevTools.

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2FJeqFlNqtDls3cbUdVmUw%2Fimage.png?alt=media&#x26;token=89481a80-2ee4-467e-92ca-d73cd332c7c9" alt=""><figcaption></figcaption></figure>

2. **First option.** Selecting the first value in the item list.
3. **Last option.** Selecting the last value in the item list.
4. **Custom.** Selecting a value in the list by index.

* &#x20; **Checkbox & Radio.** Select the checkbox or radio element or not.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.goless.com/blocks/web-interaction/forms-block.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
