open-form delete
Delete a form for good: its responses, schema versions, Studio settings and its folder in forms/. Export the responses first to keep them.
npx open-form delete event-registration
npx open-form delete event-registration --yesDeletes a form for good:
- Its data: every response, the schema versions they were stored with, any settings changed in Studio on a running server, and its response numbering. A new form with the same id later starts again at response #1.
- Its entry in
forms/.folders.json, if it was in a folder. - The folder
forms/<id>/and every file in it.
The data goes first, so a failure can't leave responses behind with no form to manage them from. Export them before you delete if you want to keep them:
npx open-form responses export event-registration -o responses.xlsxdelete asks you to type the form id to confirm. Without a terminal (in CI, or
when an agent runs it) it stops unless you pass --yes. Code you've committed
can come back from git; responses can't. On Postgres the deleted rows stay on
disk until VACUUM and in your provider's backups; see
Deleting responses.
delete also cleans up data left behind by a form whose folder was already
removed by hand: if forms/<id>/ is gone but the database still holds responses
for that id, it erases them.
Flags
| Flag | Default | Description |
|---|---|---|
-y, --yes | off | Delete without asking. |
In Studio
Under open-form dev, Studio deletes forms too: from the trash button on a
form's card in the Forms list, or from
Delete this form at the bottom of its Settings tab. Both ask for the id.
A production build can't delete forms — they're part of what was deployed — but
you can still delete their responses there.
open-form create
Create a new form from the starter at forms/<id>/index.tsx, with its own theme/index.ts, optionally starting from a theme's tokens, and print its preview path.
open-form list
List every form in the workspace with its id, title, response count and source file, read without starting a server.