Skip to main content

Delete Form

Deletes a created Form

How It Works

  1. The node validates that Form ID is provided and not empty
  2. A delete request is sent to the Robomotion Forms API at /v1/forms.delete endpoint
  3. The API permanently removes the form and all its associated instances
  4. If deletion succeeds (response.OK = true), the message passes through unchanged
  5. If deletion fails, an error is raised with the API error message

Requirements

  • A valid Form ID must be provided
  • The Form ID must correspond to an existing form in the workspace
  • User must have permissions to delete forms

Error Handling

Error CodeDescriptionCause
Core.Forms.Delete.ErrOnCreateConfig parse errorInvalid node configuration during creation
Core.Forms.Delete.ErrOnMessageMessage parse errorInvalid message format received
Core.Forms.Delete.EmptyFieldForm ID emptyForm ID input is blank or missing
Core.Forms.Delete.ErrDeletion failedAPI request failed or form not found

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • Form ID - ID of the form to delete. This ID is generated by the Create Form node.

Usage Examples

Example 1: Clean Up Temporary Forms

Create Form → msg.tempFormID
└─ Use Form for Data Collection
└─ Get Form Instance (retrieve all submissions)
└─ Process All Submissions
└─ Delete Form (msg.tempFormID)
└─ Log "Temporary form deleted"

Create a form, collect data, then delete it when no longer needed.

Example 2: Delete Old Forms in Batch

List Forms → msg.allForms
└─ For Each (msg.allForms)
├─ If (form.createdDate < cutoffDate)
│ └─ Delete Form (form.id)
│ └─ Log "Deleted old form: " + form.name
│ └─ [Return to For Each]
└─ [Loop Complete]

Iterate through forms and delete those older than a specific date.

Example 3: Conditional Deletion with Error Handling

Get Form Details (msg.formID)
└─ If (form.submissionCount === 0)
└─ Delete Form (msg.formID)
├─ [Success] Log "Unused form deleted"
└─ [Error with Continue On Error] Log "Could not delete form"

Delete a form only if it has no submissions, with error handling.

Usage Notes

  • WARNING: Deleting a form also deletes all its instances and submitted data - this action is irreversible
  • Ensure you have backed up or processed all form submissions before deletion
  • Form URLs shared with users will become invalid after deletion
  • The deletion is permanent - there is no recycle bin or undo functionality
  • Consider archiving important form data before deletion

Tips

  • Always verify the Form ID before deletion to avoid accidentally deleting the wrong form
  • Implement a confirmation step in production flows before deleting forms
  • Export or archive form submissions before deletion if data retention is required
  • Use List Forms to verify a form exists before attempting deletion
  • Set "Continue On Error" to true if deletion failures should not stop the workflow
  • For temporary/test forms, delete them promptly to keep the workspace clean
  • Consider implementing a "soft delete" pattern by marking forms as inactive instead