# Row Forms Technical Reference

Canonical page: https://www.adaptabletools.com/docs/technical-reference-row-form

## Row Form Options

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [autoHandle](https://www.adaptabletools.com/docs/reference/rowformoptions.md#autohandle) | `boolean` | Whether AdapTable automatically updates AG Grid data model with created/edited/deleted rows | true |
| [disableInlineEditing](https://www.adaptabletools.com/docs/reference/rowformoptions.md#disableinlineediting) | `boolean` | Prevents direct editing in Grid cells even for editable columns | false |
| [includeColumnInRowForm](https://www.adaptabletools.com/docs/reference/rowformoptions.md#includecolumninrowform) | `(rowFormColumnContext: `[`RowFormColumnContext`](https://www.adaptabletools.com/docs/reference/rowformcolumncontext.md)`) => boolean` | Is given Column displayed in Row Form | true |
| [onRowFormSubmit](https://www.adaptabletools.com/docs/reference/rowformoptions.md#onrowformsubmit) | `(rowFormSubmittedInfo: `[`RowFormSubmittedInfo`](https://www.adaptabletools.com/docs/reference/rowformsubmittedinfo.md)`<TData>) => void` | Event fired when a Row Form is submitted via a standard button provided by AdapTable; this is not invoked when custom form buttons are provided | undefined |
| [rowFormButtons](https://www.adaptabletools.com/docs/reference/rowformoptions.md#rowformbuttons) | [`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<`[`RowFormContext`](https://www.adaptabletools.com/docs/reference/rowformcontext.md)`<TData>>[]` | Custom form buttons; if provided, need to handle form submission explicitly |   |
| [rowFormDescription](https://www.adaptabletools.com/docs/reference/rowformoptions.md#rowformdescription) | `string \| ((context: `[`RowFormTitleContext`](https://www.adaptabletools.com/docs/reference/rowformtitlecontext.md)`<TData>) => string)` | Custom form description provider | undefined |
| [rowFormField](https://www.adaptabletools.com/docs/reference/rowformoptions.md#rowformfield) | `(context: `[`RowFormFieldContext`](https://www.adaptabletools.com/docs/reference/rowformfieldcontext.md)`<TData>) => Partial<`[`AdaptableFormField`](https://www.adaptabletools.com/docs/reference/adaptableformfield.md)`> \| undefined` | Per-column override for the auto-built .<br/><br/>Return any subset of `AdaptableFormField` properties to customise the<br/>field for a particular column. Anything you don&#39;t return falls back to<br/>AdapTable&#39;s default - which is derived from the column&#39;s data type<br/>(string → `text`, number → `number`, boolean → `checkbox`, date →<br/>`date`, columns with discrete options → `select`).<br/><br/>Returning `undefined` keeps the default field for that column.<br/><br/>Use this to unlock the full power of  in<br/>Row Forms - including:<br/>- presentation (`placeholder`, `helpText`, `tooltip`)<br/>- validation (`required`, `min`, `max`, `pattern`, `validate`)<br/>- data-driven `hidden` / `disabled`<br/>- alternative field types (`textarea`, `radio`, `slider`, `time`,<br/> `datetime`, `color`)<br/>- multi-select via `multi: true`<br/>- bespoke widgets via `fieldType: 'custom'` + `render` | undefined |
| [rowFormFieldLabel](https://www.adaptabletools.com/docs/reference/rowformoptions.md#rowformfieldlabel) | `(context: `[`RowFormFieldContext`](https://www.adaptabletools.com/docs/reference/rowformfieldcontext.md)`<TData>) => string` | Custom form field label provider.<br/><br/>Superseded by  (which can return any subset of<br/> properties, including `label`); kept for<br/>backward compatibility. | undefined |
| [rowFormTitle](https://www.adaptabletools.com/docs/reference/rowformoptions.md#rowformtitle) | `string \| ((context: `[`RowFormTitleContext`](https://www.adaptabletools.com/docs/reference/rowformtitlecontext.md)`<TData>) => string)` | Custom form title provider | &#39;Create New Row&#39;/&#39;Edit Row&#39; |
| [setPrimaryKeyValue](https://www.adaptabletools.com/docs/reference/rowformoptions.md#setprimarykeyvalue) | `(context: `[`SetPrimaryKeyValueContext`](https://www.adaptabletools.com/docs/reference/setprimarykeyvaluecontext.md)`<TData>) => any` | Function called when auto-handling &#39;create&#39; or &#39;clone&#39; Command Button; returned value should be valid for Primary Key column | undefined |

`includeColumnInRowForm` receives a [`RowFormColumnContext`](https://www.adaptabletools.com/docs/reference/rowformcolumncontext.md):

| Property | Type | Description |
| --- | --- | --- |
| [adaptableColumn](https://www.adaptabletools.com/docs/reference/rowformcolumncontext.md#adaptablecolumn) | [`AdaptableColumn`](https://www.adaptabletools.com/docs/reference/adaptablecolumn.md) | Column to be displayed |
| [rowFormType](https://www.adaptabletools.com/docs/reference/rowformcolumncontext.md#rowformtype) | [`RowFormType`](https://www.adaptabletools.com/docs/reference/rowformtype.md) | Type of Row Form |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/rowformcolumncontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

`rowFormButtons` is a list of [`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md) objects. The click handler receives a [`RowFormContext`](https://www.adaptabletools.com/docs/reference/rowformcontext.md), which is a create or edit context:

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [buttonStyle](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#buttonstyle) | [`ButtonStyle`](https://www.adaptabletools.com/docs/reference/buttonstyle.md)` \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => `[`ButtonStyle`](https://www.adaptabletools.com/docs/reference/buttonstyle.md)`)` | Style for Button - can be object or function that provides a `ButtonStyle` object |   |
| [disabled](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#disabled) | `(button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean` | Function that disables / enables the button based on its evaluation result |   |
| [hidden](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#hidden) | `(button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean` | Function which sets whether Button is hidden |   |
| [icon](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#icon) | [`AdaptableIcon`](https://www.adaptabletools.com/docs/reference/adaptableicon.md)` \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => `[`AdaptableIcon`](https://www.adaptabletools.com/docs/reference/adaptableicon.md)`)` | Icon for Button - can be object or function that provides a `AdaptableIcon` object |   |
| [iconPosition](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#iconposition) | `'start' \| 'end'` | Where the icon appears relative to the label | &#39;start&#39; |
| [label](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#label) | `string \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)` | Label for Button - can be string or function that provides string |   |
| [onClick](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#onclick) | `(button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => void` | Function to invoke when button is clicked |   |
| [tooltip](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#tooltip) | `string \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)` | Tooltip for Button - can be string or function that provides string |   |

`buttonStyle` is a [`ButtonStyle`](https://www.adaptabletools.com/docs/reference/buttonstyle.md):

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [className](https://www.adaptabletools.com/docs/reference/buttonstyle.md#classname) | `string` | CSS Classname to use for the Button |   |
| [tone](https://www.adaptabletools.com/docs/reference/buttonstyle.md#tone) | `'success' \| 'error' \| 'neutral' \| 'none' \| 'warning' \| 'info' \| 'accent'` | Button&#39;s Tone - values: &#39;success&#39;, &#39;error&#39;, &#39;neutral&#39;, &#39;none&#39;, &#39;warning&#39;, &#39;info&#39;, &#39;accent&#39; | &#39;neutral&#39; |
| [variant](https://www.adaptabletools.com/docs/reference/buttonstyle.md#variant) | `'text' \| 'outlined' \| 'raised'` | How Button appears - values: &#39;text&#39;, &#39;outlined&#39;, &#39;raised&#39; | &#39;outlined&#39; |

| Property | Type | Description |
| --- | --- | --- |
| [clonedRowNode](https://www.adaptabletools.com/docs/reference/createrowformcontext.md#clonedrownode) | `IRowNode<TData>` | The RowNode being cloned |
| [type](https://www.adaptabletools.com/docs/reference/createrowformcontext.md#type) | `Extract<`[`RowFormType`](https://www.adaptabletools.com/docs/reference/rowformtype.md)`, 'rowCreated'>` | Type of the Context |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/createrowformcontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

| Property | Type | Description |
| --- | --- | --- |
| [rowNode](https://www.adaptabletools.com/docs/reference/editrowformcontext.md#rownode) | `IRowNode<TData>` | The RowNode being edited |
| [type](https://www.adaptabletools.com/docs/reference/editrowformcontext.md#type) | `Extract<`[`RowFormType`](https://www.adaptabletools.com/docs/reference/rowformtype.md)`, 'rowEdited'>` | Type of the Context |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/editrowformcontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

`rowFormField` receives a [`RowFormFieldContext`](https://www.adaptabletools.com/docs/reference/rowformfieldcontext.md) and returns an [`AdaptableFormField`](https://www.adaptabletools.com/docs/reference/adaptableformfield.md):

| Property | Type | Description |
| --- | --- | --- |
| [column](https://www.adaptabletools.com/docs/reference/rowformfieldcontext.md#column) | [`AdaptableColumn`](https://www.adaptabletools.com/docs/reference/adaptablecolumn.md)`<TData>` | Column the field is being built for. Return a partial field to override the default for this column only. |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/rowformfieldcontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

Defines the form. `fields` is a list of fields, rows of fields, or field groups. `buttons` are the form buttons. `layout` is `rows` (the default) or `inline`.

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [buttons](https://www.adaptabletools.com/docs/reference/adaptableform.md#buttons) | [`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<T>[]` | Buttons to include in the Form |   |
| [description](https://www.adaptabletools.com/docs/reference/adaptableform.md#description) | `string` | Additional information to appear in the Form |   |
| [fields](https://www.adaptabletools.com/docs/reference/adaptableform.md#fields) | `(`[`AdaptableFormField`](https://www.adaptabletools.com/docs/reference/adaptableformfield.md)` \| `[`AdaptableFormField`](https://www.adaptabletools.com/docs/reference/adaptableformfield.md)`[] \| `[`AdaptableFormFieldGroup`](https://www.adaptabletools.com/docs/reference/adaptableformfieldgroup.md)`)[]` | Collection of Dynamic Fields and Field Groups to display.<br/><br/>Items can be:<br/>- a single  (rendered on its own row in the<br/> default `rows` layout, or as one cell in the `inline` layout),<br/>- an array of  (rendered side-by-side on the<br/> same row in the `rows` layout), or<br/>- an  (a labelled section that<br/> visually groups related fields). |   |
| [layout](https://www.adaptabletools.com/docs/reference/adaptableform.md#layout) | [`AdaptableFormLayout`](https://www.adaptabletools.com/docs/reference/adaptableformlayout.md) | How the form&#39;s fields are arranged on screen.<br/><br/>- `rows` (default): each field on its own row, label on the left and<br/> input on the right. Suitable for popups / wizards.<br/>- `inline`: fields are placed side-by-side on a single horizontal line,<br/> with the label rendered immediately before its input. Designed for<br/> compact contexts such as Dashboard Custom Toolbars where vertical<br/> real-estate is scarce. | &#39;rows&#39; |
| [onSubmit](https://www.adaptabletools.com/docs/reference/adaptableform.md#onsubmit) | `(formData: TData, context: T) => void` | Optional form-level submit hook.<br/><br/>Fired when the user presses `Enter` while focus is inside any field<br/>input AND the form is currently valid. The full `formData` is passed<br/>through, typed as `TData` if you&#39;ve supplied a custom shape.<br/><br/>Use this as an ergonomic shortcut to avoid wiring an explicit &quot;Submit&quot;<br/>button - or in addition to one, so power users can press Enter to<br/>commit. If the form is invalid the hook is not invoked. |   |
| [title](https://www.adaptabletools.com/docs/reference/adaptableform.md#title) | `string` | Title to appear in the Form |   |

Each field is an <ApiLink name="AdaptableFormField" link="adaptableformfield"/>:

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [clearToDefault](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#cleartodefault) | `boolean` | For single `select` fields only. When the user clears the combobox,<br/>whether to restore  instead of leaving the field empty.<br/><br/>Defaults to `true` when `defaultValue` is set, otherwise `false`.<br/>Set to `false` when an empty selection is a distinct state from the default. |   |
| [defaultValue](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#defaultvalue) | `string \| boolean \| number \| Array<string \| number \| boolean>` | Field Default Value - can be of type string, boolean, number, or for<br/>`select` fields with `multi: true` an array of those.<br/><br/>For single `select` fields, this is also the value restored when the user<br/>clears the combobox (unless  is `false`). |   |
| [disabled](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#disabled) | `boolean \| ((formData: `[`AdaptableFormData`](https://www.adaptabletools.com/docs/reference/adaptableformdata.md)`, context: `[`BaseContext`](https://www.adaptabletools.com/docs/reference/basecontext.md)`) => boolean)` | Disable the field&#39;s input. Either a boolean or a function evaluated<br/>against the current form data. Disabled fields render but the user<br/>cannot edit them. |   |
| [fieldType](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#fieldtype) | [`AdaptableFormFieldType`](https://www.adaptabletools.com/docs/reference/adaptableformfieldtype.md) | Field Type - dictates which UI control is rendered |   |
| [helpText](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#helptext) | `string` | Inline help text rendered immediately below the field&#39;s input. Useful<br/>for short explanations such as &quot;format: YYYY-MM-DD&quot; or &quot;min 3 chars&quot;. |   |
| [hidden](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#hidden) | `boolean \| ((formData: `[`AdaptableFormData`](https://www.adaptabletools.com/docs/reference/adaptableformdata.md)`, context: `[`BaseContext`](https://www.adaptabletools.com/docs/reference/basecontext.md)`) => boolean)` | Hide the field. Either a boolean or a function evaluated against the<br/>current form data. Hidden fields are not rendered and are excluded from<br/>validation. |   |
| [label](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#label) | `string` | Label to display in the Field |   |
| [max](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#max) | `number \| string` | Maximum allowed value. For `number` and `slider`: the highest accepted<br/>number. For `date`, `time` and `datetime`: the latest allowed value in<br/>ISO format. |   |
| [maxLength](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#maxlength) | `number` | Maximum length for `text` and `textarea` fields. |   |
| [min](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#min) | `number \| string` | Minimum allowed value. For `number` and `slider`: the lowest accepted<br/>number. For `date`, `time` and `datetime`: the earliest allowed value<br/>in ISO format (`YYYY-MM-DD` / `HH:mm` / `YYYY-MM-DDTHH:mm`). |   |
| [minLength](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#minlength) | `number` | Minimum length for `text` and `textarea` fields. |   |
| [multi](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#multi) | `boolean` | For `select` fields only. When `true` the field renders as a<br/>multi-select combobox; the field&#39;s value is an array of selected<br/>`option.value`s rather than a single value. | false |
| [name](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#name) | `string` | Name of the Field |   |
| [onValueChange](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#onvaluechange) | `(value: any, context: `[`BaseContext`](https://www.adaptabletools.com/docs/reference/basecontext.md)`) => void` | Optional callback invoked whenever value of this field changes |   |
| [options](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#options) | [`AdaptableFormFieldOption`](https://www.adaptabletools.com/docs/reference/adaptableformfieldoption.md)`[] \| ((formData: `[`AdaptableFormData`](https://www.adaptabletools.com/docs/reference/adaptableformdata.md)`, context: `[`BaseContext`](https://www.adaptabletools.com/docs/reference/basecontext.md)`) => `[`AdaptableFormFieldOption`](https://www.adaptabletools.com/docs/reference/adaptableformfieldoption.md)`[] \| Promise<`[`AdaptableFormFieldOption`](https://www.adaptabletools.com/docs/reference/adaptableformfieldoption.md)`[]>)` | Items to populate the `select` and `radio` fieldTypes.<br/><br/>Either a static array, or a function that derives the options from the<br/>current form data and Adaptable context. The function form may return<br/>a Promise for asynchronously-loaded options - the form will render the<br/>field with no items until the promise resolves. |   |
| [pattern](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#pattern) | `string` | Regular expression that the value of a `text` field must match. |   |
| [placeholder](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#placeholder) | `string` | Placeholder text shown inside `text`, `textarea`, `number`, `date`,<br/>`time` and `datetime` inputs when empty. For `select` fields it is<br/>rendered as the empty-state label when no value is selected.<br/><br/>When omitted on a `select` field with a , the label of<br/>the matching `options` entry is used as the empty-state label. |   |
| [render](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#render) | `(params: `[`AdaptableFormFieldRenderParams`](https://www.adaptabletools.com/docs/reference/adaptableformfieldrenderparams.md)`) => React.ReactNode` | For `custom` fields only. Renders an arbitrary React node as the<br/>field&#39;s input. Receives the current value, a `setValue` setter<br/>(controlled), the current form data, the Adaptable context and the<br/>resolved `disabled` state.<br/><br/>Use this as an escape hatch when none of the built-in `fieldType`s<br/>fit - e.g. to render a star-rating widget, a tag editor or any<br/>bespoke control. |   |
| [required](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#required) | `boolean` | If `true` the field is treated as required. An empty value (`''`,<br/>`null`, `undefined`, or unchecked checkbox) will produce a validation<br/>error. |   |
| [rows](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#rows) | `number` | For `textarea` fields: the visible number of text rows. | 3 |
| [step](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#step) | `number` | Stepping interval for `number`, `slider`, `time` and `datetime`<br/>fields. |   |
| [tooltip](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#tooltip) | `string` | Tooltip shown when hovering the field&#39;s label. |   |
| [validate](https://www.adaptabletools.com/docs/reference/adaptableformfield.md#validate) | `(value: any, formData: `[`AdaptableFormData`](https://www.adaptabletools.com/docs/reference/adaptableformdata.md)`, context: `[`BaseContext`](https://www.adaptabletools.com/docs/reference/basecontext.md)`) => string \| null \| undefined` | Custom field-level validation. Return an error message string to mark<br/>the field invalid, or `null`/`undefined` if the value is valid.<br/><br/>Custom validation runs *after* built-in checks (`required`, `min`,<br/>`max`, `pattern`, etc.) - the first failing check wins. |   |

`fieldType` is an <ApiLink name="AdaptableFormFieldType" link="adaptableformfieldtype"/>:

[See API: adaptableformfieldtype](https://www.adaptabletools.com/docs/reference/adaptableformfieldtype.md)

Select and radio `options` are <ApiLink name="AdaptableFormFieldOption" link="adaptableformfieldoption"/> objects:

| Property | Type | Description |
| --- | --- | --- |
| [label](https://www.adaptabletools.com/docs/reference/adaptableformfieldoption.md#label) | `string` | Text shown for this choice. |
| [value](https://www.adaptabletools.com/docs/reference/adaptableformfieldoption.md#value) | `any` | Value written into the form data when this choice is selected. |

`layout` is an <ApiLink name="AdaptableFormLayout" link="adaptableformlayout"/>:

[See API: adaptableformlayout](https://www.adaptabletools.com/docs/reference/adaptableformlayout.md)

`buttons` are <ApiLink name="AdaptableButton" link="adaptablebutton"/> objects:

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [buttonStyle](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#buttonstyle) | [`ButtonStyle`](https://www.adaptabletools.com/docs/reference/buttonstyle.md)` \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => `[`ButtonStyle`](https://www.adaptabletools.com/docs/reference/buttonstyle.md)`)` | Style for Button - can be object or function that provides a `ButtonStyle` object |   |
| [disabled](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#disabled) | `(button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean` | Function that disables / enables the button based on its evaluation result |   |
| [hidden](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#hidden) | `(button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean` | Function which sets whether Button is hidden |   |
| [icon](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#icon) | [`AdaptableIcon`](https://www.adaptabletools.com/docs/reference/adaptableicon.md)` \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => `[`AdaptableIcon`](https://www.adaptabletools.com/docs/reference/adaptableicon.md)`)` | Icon for Button - can be object or function that provides a `AdaptableIcon` object |   |
| [iconPosition](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#iconposition) | `'start' \| 'end'` | Where the icon appears relative to the label | &#39;start&#39; |
| [label](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#label) | `string \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)` | Label for Button - can be string or function that provides string |   |
| [onClick](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#onclick) | `(button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => void` | Function to invoke when button is clicked |   |
| [tooltip](https://www.adaptabletools.com/docs/reference/adaptablebutton.md#tooltip) | `string \| ((button: `[`AdaptableButton`](https://www.adaptabletools.com/docs/reference/adaptablebutton.md)`<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)` | Tooltip for Button - can be string or function that provides string |   |

`buttonStyle` is a <ApiLink name="ButtonStyle" link="buttonstyle"/>:

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [className](https://www.adaptabletools.com/docs/reference/buttonstyle.md#classname) | `string` | CSS Classname to use for the Button |   |
| [tone](https://www.adaptabletools.com/docs/reference/buttonstyle.md#tone) | `'success' \| 'error' \| 'neutral' \| 'none' \| 'warning' \| 'info' \| 'accent'` | Button&#39;s Tone - values: &#39;success&#39;, &#39;error&#39;, &#39;neutral&#39;, &#39;none&#39;, &#39;warning&#39;, &#39;info&#39;, &#39;accent&#39; | &#39;neutral&#39; |
| [variant](https://www.adaptabletools.com/docs/reference/buttonstyle.md#variant) | `'text' \| 'outlined' \| 'raised'` | How Button appears - values: &#39;text&#39;, &#39;outlined&#39;, &#39;raised&#39; | &#39;outlined&#39; |

`setPrimaryKeyValue` receives a [`SetPrimaryKeyValueContext`](https://www.adaptabletools.com/docs/reference/setprimarykeyvaluecontext.md):

| Property | Type | Description |
| --- | --- | --- |
| [rowData](https://www.adaptabletools.com/docs/reference/setprimarykeyvaluecontext.md#rowdata) | `TData` | Data in the row being created or cloned |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/setprimarykeyvaluecontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

-----------

## Row Form Submitted Event

AdapTable fires the Row Form Submitted Event when an `edit` or `create` Row Form is submitted (or a `delete` ActionRowButton is clicked).

This allows developers to handle the form submission themselves, and provide any additional actions, validation or messages to backend services as required.

AdapTable handles all row manipulation directly, bypassing this event, if `autoHandle` is set to *true* in Row Form Options

### RowFormSubmittedInfo

The [`RowFormSubmittedInfo`](https://www.adaptabletools.com/docs/reference/rowformsubmittedinfo.md) object can be one of 3 types:

- a [`CreatedRowInfo`](https://www.adaptabletools.com/docs/reference/createdrowinfo.md) - which is defined as follows
  
| Property | Type | Description |
| --- | --- | --- |
| [formData](https://www.adaptabletools.com/docs/reference/createdrowinfo.md#formdata) | [`AdaptableFormData`](https://www.adaptabletools.com/docs/reference/adaptableformdata.md) | Values entered in the form. Empty strings are omitted. |
| [rowNode](https://www.adaptabletools.com/docs/reference/createdrowinfo.md#rownode) | `IRowNode<TData>` | Not set for a created row. The row does not exist yet; it is added from `formData` after this event. |
| [type](https://www.adaptabletools.com/docs/reference/createdrowinfo.md#type) | `'rowCreated'` | Always `rowCreated`. |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/createdrowinfo.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

- an [`EditedRowInfo`](https://www.adaptabletools.com/docs/reference/editedrowinfo.md) - which is defined as follows
  
| Property | Type | Description |
| --- | --- | --- |
| [formData](https://www.adaptabletools.com/docs/reference/editedrowinfo.md#formdata) | [`AdaptableFormData`](https://www.adaptabletools.com/docs/reference/adaptableformdata.md) | Values entered in the form. |
| [rowNode](https://www.adaptabletools.com/docs/reference/editedrowinfo.md#rownode) | `IRowNode<TData>` | Row being edited. It is still the row in the grid when this event fires. |
| [type](https://www.adaptabletools.com/docs/reference/editedrowinfo.md#type) | `'rowEdited'` | Always `rowEdited`. |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/editedrowinfo.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

- a [`DeletedRowInfo`](https://www.adaptabletools.com/docs/reference/deletedrowinfo.md) - which is defined as follows
  
| Property | Type | Description |
| --- | --- | --- |
| [rowNode](https://www.adaptabletools.com/docs/reference/deletedrowinfo.md#rownode) | `IRowNode<TData>` | Row about to be deleted. It is still in the grid when this event fires. |
| [type](https://www.adaptabletools.com/docs/reference/deletedrowinfo.md#type) | `'rowDeleted'` | Always `rowDeleted`. |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/deletedrowinfo.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

### Event Subscription

Subscribing to the Event is done the same way as with all [Adaptable Events](https://www.adaptabletools.com/docs/technical-reference-adaptable-events/index.md):

```ts
api.eventApi.on('RowFormSubmitted', (eventInfo: RowFormSubmittedInfo) => {
    // do something with the info
});
```

-----------

## Row Form API

| Method | Returns | Description |
| --- | --- | --- |
| [displayCloneRowForm(primaryKey)](https://www.adaptabletools.com/docs/reference/rowformapi.md#displayclonerowform) | `Promise<void>` | Opens the Row Form to create a row, prefilled from an existing row. |
| [displayCreateRowForm()](https://www.adaptabletools.com/docs/reference/rowformapi.md#displaycreaterowform) | `Promise<void>` | Open create dialog for a new row |
| [displayDeleteRowForm(primaryKey)](https://www.adaptabletools.com/docs/reference/rowformapi.md#displaydeleterowform) | `void` | Deletes a row and fires the Row Form submitted event. No form is shown. |
| [displayEditRowForm(primaryKey)](https://www.adaptabletools.com/docs/reference/rowformapi.md#displayeditrowform) | `Promise<void>` | Opens the Row Form to edit the row with this primary key. |
