Skip to Content
ContentAPIClassesClass: FieldArrayItemBuilder<TItem>

Hero Hook Form API v2.5.1


Hero Hook Form API / FieldArrayItemBuilder

Class: FieldArrayItemBuilder<TItem>

Defined in: builders/AdvancedFormBuilder.ts:494 

Field Array Builder for strongly-typed array item fields

Type Parameters

TItem

TItem extends FieldValues

Constructors

Constructor

new FieldArrayItemBuilder<TItem>(): FieldArrayItemBuilder<TItem>

Returns

FieldArrayItemBuilder<TItem>

Methods

field()

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:500 

Add any field type using the unified API for array items

Parameters
type

"input"

name

Path<TItem>

label

string

props?

any

Returns

this

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:506 

Add any field type using the unified API for array items

Parameters
type

"textarea"

name

Path<TItem>

label

string

props?

any

Returns

this

Call Signature

field(type, name, label, options, props?): this

Defined in: builders/AdvancedFormBuilder.ts:512 

Add any field type using the unified API for array items

Parameters
type

"select"

name

Path<TItem>

label

string

options

object[]

props?

any

Returns

this

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:519 

Add any field type using the unified API for array items

Parameters
type

"checkbox"

name

Path<TItem>

label

string

props?

any

Returns

this

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:525 

Add any field type using the unified API for array items

Parameters
type

"switch"

name

Path<TItem>

label

string

props?

any

Returns

this

Call Signature

field(type, name, label, options, props?): this

Defined in: builders/AdvancedFormBuilder.ts:531 

Add any field type using the unified API for array items

Parameters
type

"radio"

name

Path<TItem>

label

string

options

object[]

props?

any

Returns

this

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:538 

Add any field type using the unified API for array items

Parameters
type

"slider"

name

Path<TItem>

label

string

props?

any

Returns

this

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:544 

Add any field type using the unified API for array items

Parameters
type

"date"

name

Path<TItem>

label

string

props?

any

Returns

this

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:550 

Add any field type using the unified API for array items

Parameters
type

"file"

name

Path<TItem>

label

string

props?

any

Returns

this

Call Signature

field(type, name, label, props?): this

Defined in: builders/AdvancedFormBuilder.ts:556 

Add any field type using the unified API for array items

Parameters
type

"fontPicker"

name

Path<TItem>

label

string

props?

any

Returns

this


build()

build(): ZodFormFieldConfig<TItem>[]

Defined in: builders/AdvancedFormBuilder.ts:577 

Build the field array item configuration

Returns

ZodFormFieldConfig<TItem>[]