# TextBox Group

(part of package '[Servoy Extra Components](/reference/servoyextensions/packages/ui-component-packages/servoy-extra-components.md)')\
Extends designtime/SolutionModel: [JSWebComponent](/reference/servoycore/dev-api/solutionmodel/jswebcomponent.md)\
Extends runtime: [RuntimeWebComponent](/reference/servoycore/dev-api/forms/runtimeform/elements/runtimewebcomponent.md)

A Servoy Extra Component that groups one or more text fields, allowing for combined data input and validation.

This is a reference page; many components have detailed usage guides [here](https://docs.servoy.com/guides/develop/application-design/ui-components).

## Properties

### dataProviderID

Bound data provider identifier for the text field group value. Type: [Dataprovider](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)

***

### enabled

Flag indicating whether the text field group is enabled for user interaction. Type: [Enabled](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### faclass

CSS style classes applied to the icon associated with the text field group. Type: [String](/reference/servoycore/dev-api/js-lib/string.md)

***

### format

Format string used to display and parse the text field group value. Type: [Format](/reference/servoy-developer/component_and_service_property_types.md#format)

***

### inputType

Specifies the type of input for the text field group (for example, "text" or "password"). Type: [String](/reference/servoycore/dev-api/js-lib/string.md) Default Value: "text"

***

### inputValidation

Specifies the validation to apply to the input (for example, "none" or "email"). Type: [String](/reference/servoycore/dev-api/js-lib/string.md) Default Value: "text"

***

### invalidEmailMessage

Message displayed when an invalid email address is entered. Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring) Default Value: "This is an invalid email address"

***

### placeholderText

Placeholder text displayed when the text field group is empty. Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)

***

### readOnly

Flag indicating whether the text field group is read-only. Type: [Protected](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: false

***

### styleClass

CSS style classes applied to the text field group component. Type: [Styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass) Default Value: "form-control"

***

### tabSeq

Tab sequence order for keyboard navigation. Type: [Tabseq](/reference/servoy-developer/component_and_service_property_types.md#tabseq)

***

### visible

Flag indicating whether the text field group is visible. Type: [Visible](/reference/servoy-developer/component_and_service_property_types.md#visible)

***

## Events

### onActionMethodID(event)

Called when the text field group triggers an action.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the action event.

***

### onDataChangeMethodID(oldValue,newValue,event)

Called when the value of the text field group changes.

**Parameters:**

> * {[${dataproviderType}](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)} oldValue The previous value from the data provider.
> * {[${dataproviderType}](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)} newValue The new value to be set.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object associated with the data change.

**Returns:** {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)}

***

### onFocusGainedMethodID(event)

Called when the text field group gains focus.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the focus gained event.

***

### onFocusLostMethodID(event)

Called when the text field group loses focus.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the focus lost event.

***

### onRightClickMethodID(event)

Called when the text field group is right-clicked.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the right-click event.

***

## API

### isValid()

Checks whether the current input is a valid email address or if the input is empty.

**Returns:** [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Returns true if the input is valid (i.e., it is a valid email address or the input is empty); otherwise, false.

***

### requestFocus(mustExecuteOnFocusGainedMethod)

Request the focus to this field.

**Example:**

```js
myElement.requestFocus();
```

**Parameters:**

> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[mustExecuteOnFocusGainedMethod] If false will not execute the onFocusGained method; the default value is true

***

***


---

# 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.servoy.com/reference/servoyextensions/ui-components/input-control/textbox-group.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.
