# Class Form

Form Class

#### Implements

- AbstractForm

- Defined in packages/saltcorn-data/models/form.ts:33
- Defined in packages/saltcorn-data/models/form.ts:285

##### Index

### Constructors

constructor

### Properties

__?
action?
additionalButtons?
additionalHeaders?
blurb?
class?
collapsedSummary?
errors
fields
formStyle
hasErrors
id?
isOwner
isWorkflow?
labelCols?
layout?
methodGET
noSubmitButton?
onChange?
onSubmit?
pk_name?
popup_width?
req
splitPaste
submitButtonClass?
submitLabel?
tabs?
validator?
values
viewname?
xhrSubmit

### Accessors

errorSummary

### Methods

asyncValidate
fill_fkey_options
generate
hidden
validate

## Constructors

### constructor

- new Form(o: FormCfg): Form

  Constructor

  #### Parameters

  - o: FormCfg

  #### Returns Form

  - Defined in packages/saltcorn-data/models/form.ts:71

## Properties

### `Optional`__

__?: any

Implementation of AbstractForm.__

- Defined in packages/saltcorn-data/models/form.ts:62

### `Optional` action

action?: string

Implementation of AbstractForm.action

- Defined in packages/saltcorn-data/models/form.ts:37

### `Optional` additionalButtons

additionalButtons?: AdditionalButton[]

Implementation of AbstractForm.additionalButtons

- Defined in packages/saltcorn-data/models/form.ts:50

### `Optional` additionalHeaders

additionalHeaders?: Header[]

- Defined in packages/saltcorn-data/models/form.ts:52

### `Optional` blurb

blurb?: string | string[]

Implementation of AbstractForm.blurb

- Defined in packages/saltcorn-data/models/form.ts:46

### `Optional` class

class?: string

Implementation of AbstractForm.class

- Defined in packages/saltcorn-data/models/form.ts:44

### `Optional` collapsedSummary

collapsedSummary?: string

- Defined in packages/saltcorn-data/models/form.ts:42

### errors

errors: any

Implementation of AbstractForm.errors

- Defined in packages/saltcorn-data/models/form.ts:35

### fields

fields: (Field | FieldRepeat)[]

Implementation of AbstractForm.fields

- Defined in packages/saltcorn-data/models/form.ts:34

### formStyle

formStyle: string

Implementation of AbstractForm.formStyle

- Defined in packages/saltcorn-data/models/form.ts:43

### hasErrors

hasErrors: boolean

- Defined in packages/saltcorn-data/models/form.ts:55

### `Optional` id

id?: string

Implementation of AbstractForm.id

- Defined in packages/saltcorn-data/models/form.ts:40

### isOwner

isOwner: boolean

Implementation of AbstractForm.isOwner

- Defined in packages/saltcorn-data/models/form.ts:58

### `Optional` isWorkflow

isWorkflow?: boolean

Implementation of AbstractForm.isWorkflow

- Defined in packages/saltcorn-data/models/form.ts:63

### `Optional` labelCols

labelCols?: number

Implementation of AbstractForm.labelCols

- Defined in packages/saltcorn-data/models/form.ts:41

### `Optional` layout

layout?: Layout

Implementation of AbstractForm.layout

- Defined in packages/saltcorn-data/models/form.ts:39

### methodGET

methodGET: boolean

Implementation of AbstractForm.methodGET

- Defined in packages/saltcorn-data/models/form.ts:45

### `Optional` noSubmitButton

noSubmitButton?: boolean

Implementation of AbstractForm.noSubmitButton

- Defined in packages/saltcorn-data/models/form.ts:49

### `Optional` onChange

onChange?: string

Implementation of AbstractForm.onChange

- Defined in packages/saltcorn-data/models/form.ts:53

### `Optional` onSubmit

onSubmit?: string

Implementation of AbstractForm.onSubmit

- Defined in packages/saltcorn-data/models/form.ts:59

### `Optional` pk_name

pk_name?: string

Implementation of AbstractForm.pk_name

- Defined in packages/saltcorn-data/models/form.ts:64

### `Optional` popup_width

popup_width?: string

- Defined in packages/saltcorn-data/models/form.ts:65

### req

req: any

Implementation of AbstractForm.req

- Defined in packages/saltcorn-data/models/form.ts:60

### splitPaste

splitPaste: boolean

Implementation of AbstractForm.splitPaste

- Defined in packages/saltcorn-data/models/form.ts:57

### `Optional` submitButtonClass

submitButtonClass?: string

Implementation of AbstractForm.submitButtonClass

- Defined in packages/saltcorn-data/models/form.ts:48

### `Optional` submitLabel

submitLabel?: string

Implementation of AbstractForm.submitLabel

- Defined in packages/saltcorn-data/models/form.ts:47

### `Optional` tabs

tabs?: string

Implementation of AbstractForm.tabs

- Defined in packages/saltcorn-data/models/form.ts:61

### `Optional` validator

validator?: (arg0: GenObj) => any

- Defined in packages/saltcorn-data/models/form.ts:54

### values

values: GenObj

Implementation of AbstractForm.values

- Defined in packages/saltcorn-data/models/form.ts:36

### `Optional` viewname

viewname?: string

Implementation of AbstractForm.viewname

- Defined in packages/saltcorn-data/models/form.ts:38

### xhrSubmit

xhrSubmit: boolean

Implementation of AbstractForm.xhrSubmit

- Defined in packages/saltcorn-data/models/form.ts:56

## Accessors

### errorSummary

- get errorSummary(): string

  #### Returns string

  - Defined in packages/saltcorn-data/models/form.ts:172

## Methods

### asyncValidate

- asyncValidate(v: any): Promise<{ success: any } | { errors: any }>

  #### Parameters

  - v: any

  #### Returns Promise<{ success: any } | { errors: any }>

  - Defined in packages/saltcorn-data/models/form.ts:182

### fill_fkey_options

- fill_fkey_options(
  force_allow_none?: boolean,
  optionsQuery?: any,
  user?: User,
  ): Promise<void>

  #### Parameters

  - `Optional` force_allow_none: boolean = false
  - `Optional` optionsQuery: any
  - `Optional` user: User

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/form.ts:125

### generate

- generate(): Promise<any>

  #### Returns Promise<any>

  - Defined in packages/saltcorn-data/models/form.ts:155

### hidden

- hidden(...ks: string[]): void

  #### Parameters

  - ...ks: string[]

  #### Returns void

  - Defined in packages/saltcorn-data/models/form.ts:110

### validate

- validate(v: any): { success: any } | { errors: any }

  #### Parameters

  - v: any

  #### Returns { success: any } | { errors: any }

  - Defined in packages/saltcorn-data/models/form.ts:205