Components
FormForgeBuilder
UI component for authoring, editing, and publishing form-definition drafts.
FormForgeBuilder provides a form-definition editing UI.
<FormForgeBuilder
v-model="model"
:autosave="true"
:autosave-delay="5000"
/>
Builder model shape
{
uuid: string | null,
key: string | null,
schema_version: number,
title: string,
publish_at?: string | null,
pause_at?: string | null,
response_limit?: number | null,
submission_code_required?: boolean,
submission_code?: string | null,
public_url?: string | null,
category: string | null,
pages: FormForgePageSchema[],
conditions: FormForgeCondition[],
drafts: { enabled: boolean },
api: Record<string, unknown>
}
Current field palette
The builder UI currently exposes these field families:
textfor free textnumberradiofor single choicecheckbox_groupfor multiple choiceconsentaddresstemporalfor date and time fieldsfile
The builder UI labels schema pages as blocks. The underlying schema still stores them in
pages.Standalone builder
Use standalone when the builder lives inside a dedicated admin or playground screen.
Combine it with hideSettings when you want the schema editor but not the settings tab.
<FormForgeBuilder
ref="builder"
v-model="model"
standalone
hide-settings
auto-publish-on-save
/>
UI control props
Use these props to simplify the builder when you embed it in constrained admin screens.
disableTitleInput(false)disableCategoryControl(false)disablePublishAction(false)hideSettings(false)disableSettingsTab(false, deprecated alias forhideSettings)autoPublishOnSave(false)defaultPublished(false)standalone(false)formRouteKey(undefined) loads the first form from a configuredform-routes/{key}endpoint whenloadFormKeyis not providedcategoryRouteKey(undefined) loads categories fromcategory-routes/{key}
Publication and save behavior
- The settings tab covers opening / closing dates, response limits, and PIN protection
autoPublishOnSavepublishes every successful save, including autosave-driven savesdefaultPublishedonly affects the initial publish state in the UIhideSettingsis runtime-only and is not stored on the form recordpublic_urlis read-only and comes from the backend resolver when one is configured
<FormForgeBuilder
v-model="model"
:hide-settings="true"
:auto-publish-on-save="true"
/>
If a workflow must always remain published, prefer
autoPublishOnSave with hideSettings. Do not rely on defaultPublished alone.Exposed methods
The component ref exposes these methods:
save()publish()unpublish()togglePublishState()
<script setup lang="ts">
const builder = ref<InstanceType<typeof FormForgeBuilder> | null>(null)
async function saveForm(): Promise<void> {
await builder.value?.save()
}
</script>
<template>
<FormForgeBuilder ref="builder" v-model="model" />
<UButton class="mt-4" @click="saveForm">
Save
</UButton>
</template>
Typical usage
- create a new form definition
- patch an existing form definition
- publish and unpublish revisions
- keep a system form published on every save