# Class Form

Form Class

#### Hierarchy

- Form

#### Implements

- AbstractForm

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

#####
Index

### Constructors

constructor

### Properties

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

### Accessors

errorSummary

### Methods

asyncValidate
fill_fkey_options
generate
hidden
validate

## Constructors

### constructor

- new Form(o): Form

- Constructor

  #### Parameters

  - ##### o: FormCfg

  #### Returns Form

  - Defined in saltcorn-data/models/form.ts:69

## Properties

### `Optional` __

__?: any

Implementation of AbstractForm.__

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

### `Optional` action

action?: string

Implementation of AbstractForm.action

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

### `Optional` additionalButtons

additionalButtons?: AdditionalButton[]

Implementation of AbstractForm.additionalButtons

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

### `Optional` additionalHeaders

additionalHeaders?: Header[]

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

### `Optional` blurb

blurb?: string | string[]

Implementation of AbstractForm.blurb

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

### `Optional` class

class?: string

Implementation of AbstractForm.class

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

### `Optional` collapsedSummary

collapsedSummary?: string

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

### errors

errors: any

Implementation of AbstractForm.errors

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

### fields

fields: (Field | FieldRepeat)[]

Implementation of AbstractForm.fields

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

### formStyle

formStyle: string

Implementation of AbstractForm.formStyle

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

### hasErrors

hasErrors: boolean

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

### `Optional` id

id?: string

Implementation of AbstractForm.id

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

### isOwner

isOwner: boolean

Implementation of AbstractForm.isOwner

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

### `Optional` isWorkflow

isWorkflow?: boolean

Implementation of AbstractForm.isWorkflow

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

### `Optional` labelCols

labelCols?: number

Implementation of AbstractForm.labelCols

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

### `Optional` layout

layout?: Layout

Implementation of AbstractForm.layout

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

### methodGET

methodGET: boolean

Implementation of AbstractForm.methodGET

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

### `Optional` noSubmitButton

noSubmitButton?: boolean

Implementation of AbstractForm.noSubmitButton

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

### `Optional` onChange

onChange?: string

Implementation of AbstractForm.onChange

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

### `Optional` onSubmit

onSubmit?: string

Implementation of AbstractForm.onSubmit

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

### req

req: any

Implementation of AbstractForm.req

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

### splitPaste

splitPaste: boolean

Implementation of AbstractForm.splitPaste

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

### `Optional` submitButtonClass

submitButtonClass?: string

Implementation of AbstractForm.submitButtonClass

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

### `Optional` submitLabel

submitLabel?: string

Implementation of AbstractForm.submitLabel

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

### `Optional` tabs

tabs?: string

Implementation of AbstractForm.tabs

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

### `Optional` validator

validator?: ((arg0) => any)

#### Type declaration

- - (arg0): any

  - #### Parameters

    - ##### arg0: GenObj

    #### Returns any

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

### values

values: GenObj

Implementation of AbstractForm.values

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

### `Optional` viewname

viewname?: string

Implementation of AbstractForm.viewname

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

### xhrSubmit

xhrSubmit: boolean

Implementation of AbstractForm.xhrSubmit

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

## Accessors

### errorSummary

- get errorSummary(): string

- #### Returns string

  - Defined in saltcorn-data/models/form.ts:168

## Methods

### asyncValidate

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

- #### Parameters

  - ##### v: any

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

  - Defined in saltcorn-data/models/form.ts:178

### fill_fkey_options

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

- #### Parameters

  - ##### `Optional` force_allow_none: boolean = false

  - ##### `Optional` optionsQuery: any

  - ##### `Optional` user: User

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/form.ts:122

### generate

- generate(): Promise<any>

- #### Returns Promise<any>

  - Defined in saltcorn-data/models/form.ts:151

### hidden

- hidden(...ks): void

- #### Parameters

  - ##### `Rest` ...ks: string[]

  #### Returns void

  - Defined in saltcorn-data/models/form.ts:107

### validate

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

- #### Parameters

  - ##### v: any

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

  - Defined in saltcorn-data/models/form.ts:201

Generated using TypeDoc