Skip to Content
ContentAPIFunctionsFunction: createField()

Hero Hook Form API v2.5.1


Hero Hook Form API / createField

Function: createField()

createField<T>(type, name, label, optionsOrProps?, props?): ZodFormFieldConfig<T>

Defined in: builders/AdvancedFormBuilder.ts:273 

Unified field creation function Takes field type as first argument and delegates to appropriate helper

Type Parameters

T

T extends FieldValues

Parameters

type

string

name

Path<T>

label

string

optionsOrProps?

any

props?

any

Returns

ZodFormFieldConfig<T>