### File

`packages/eui-dynamic-forms-ui/src/lib/shared/services/form.service.ts`

### Index

###### Properties

- traceService

###### Methods

- calculateControls
- createFormArray
- createFormControl
- createFormGroup
- createFormItem
- deleteFrameInstance
- destroy
- fetchData
- getControlFromParent
- getFormState
- getFrameInstance
- getMultiStoreServiceInstance
- init
- Public isSameInstanceWith
- pullOnSubmit
- pushOnSubmit
- registerFrameInstance
- runRules
- setArrayParent
- setFormItemParentAndGetData
- setGroupParent
- setValidators

### Constructor

`constructor(dynConfigService: DynConfigService, dynDataService: DynDataService, multipleStore: MultiStoreService, logService: LogService, validationsService: DynValidationsService)`

Parameters :

Name | Type | Optional
dynConfigService | `DynConfigService` | No
dynDataService | `DynDataService` | No
multipleStore | `MultiStoreService` | No
logService | `LogService` | No
validationsService | `DynValidationsService` | No

### Methods

calculateControls
`calculateControls(parent: FormGroup | FormArray, metaData: UxDynFormModelArray, parentData, parentIndex?)`

Parameters :

Name | Type | Optional
parent | `FormGroup | FormArray` | No
metaData | `UxDynFormModelArray` | No
parentData |  | No
parentIndex |  | Yes

Returns : `void`

createFormArray
`createFormArray()`
Returns : `any`

createFormControl
`createFormControl()`
Returns : `any`

createFormGroup
`createFormGroup()`
Returns : `any`

createFormItem
`createFormItem(field: UxDynFormModel)`

Parameters :

Name | Type | Optional
field | `UxDynFormModel` | No

Returns : `any`

deleteFrameInstance
`deleteFrameInstance(id)`

Parameters :

Name | Optional
id | No

Returns : `void`

destroy
`destroy(id)`

Parameters :

Name | Optional
id | No

Returns : `void`

fetchData
`fetchData(fetchType: UxDynFetchTypes, mapTo?: UxDynMapToConfig)`

Parameters :

Name | Type | Optional
fetchType | `UxDynFetchTypes` | No
mapTo | `UxDynMapToConfig` | Yes

Returns : `Observable<any>`

getControlFromParent
`getControlFromParent(parent, key)`

Parameters :

Name | Optional
parent | No
key | No

Returns : `any`

getFormState
`getFormState(id)`

Parameters :

Name | Optional
id | No

Returns : `any`

getFrameInstance
`getFrameInstance(id: string)`

Parameters :

Name | Type | Optional
id | `string` | No

Returns : `DynFormApi`

getMultiStoreServiceInstance
`getMultiStoreServiceInstance(id)`

Parameters :

Name | Optional
id | No

Returns : `any`

init
`init(id)`

Parameters :

Name | Optional
id | No

Returns : `void`

Public isSameInstanceWith
`isSameInstanceWith(compared: object, ref: object)`

Parameters :

Name | Type | Optional
compared | `object` | No
ref | `object` | No

Returns : `boolean`

pullOnSubmit
`pullOnSubmit()`
Returns : `Observable<any>`

pushOnSubmit
`pushOnSubmit(data)`

Parameters :

Name | Optional
data | No

Returns : `void`

registerFrameInstance
`registerFrameInstance(id, instance)`

Parameters :

Name | Optional
id | No
instance | No

Returns : `void`

runRules
`runRules(metaData: UxDynRuleMetaData, formApi: DynFormApi)`

Parameters :

Name | Type | Optional
metaData | `UxDynRuleMetaData` | No
formApi | `DynFormApi` | No

Returns : `void`

setArrayParent
`setArrayParent(parent: FormArray, item, index: number)`

Parameters :

Name | Type | Optional
parent | `FormArray` | No
item |  | No
index | `number` | No

Returns : `void`

setFormItemParentAndGetData
`setFormItemParentAndGetData(item, field, parent, parentData, parentIndex)`

Parameters :

Name | Optional
item | No
field | No
parent | No
parentData | No
parentIndex | No

Returns : `any`

setGroupParent
`setGroupParent(parent: FormGroup, item, key: string)`

Parameters :

Name | Type | Optional
parent | `FormGroup` | No
item |  | No
key | `string` | No

Returns : `void`

setValidators
`setValidators(control: AbstractControl, context)`

Parameters :

Name | Type | Optional
control | `AbstractControl` | No
context |  | No

Returns : `void`

### Properties

traceService
Type : `Logger`

# result-matching ""

# No results matching ""