Skip to content

CustomFormBase (v-custom-form-base) legacy ​

CustomFormBase is the original self-contained schema-driven form engine. It implements the same VFormBase API as FormBase but with all rendering logic and helper methods inline in the component rather than split into a composable and a sub-component.

WARNING

CustomFormBase is kept for backwards compatibility. For new work use FormBase (v-form-base), which is the refactored version with the same API.

API ​

CustomFormBase accepts exactly the same props, emits, schema syntax, slot naming convention, and supported field types as FormBase. Refer to the FormBase documentation for the complete reference.

Key differences from FormBase:

AspectFormBaseCustomFormBase
Logic locationuseFormBaseLogic composableInline in the component's methods and computed
Field renderingDelegated to FormBaseFieldInline v-if/v-else-if chain in the template
Composition APIsetup returns ctx from composableOptions API with getCurrentInstance in setup
Nested self-referencev-form-basev-custom-form-base (references itself recursively)
Schema rebuild triggerwatch on modelValue keys via __dot + onBeforeMountwatch on modelValue keys via __dot in created

When to use ​

Use CustomFormBase only when:

  • You are maintaining existing code that already imports v-custom-form-base.
  • You need to avoid a refactor risk in a critical path.

In all other cases, use FormBase.