1. Action Meta
  2. Public Forms Documentation

Action Meta

Public Forms Documentation

Overview

Public Forms allow you to expose an action as a public, UUID-based form endpoint. This enables external users to submit data to a specific action via a unique URL, without authentication, using a form whose fields are derived from the action's own field definitions.

Enabling Public Forms

To enable a public form for an action, set the following in the action's action_meta:

        "action_meta": {
  "public_form": {
    "enable": true
  }
}

      

This will allow the action to be referenced and accessed via a public form endpoint at /stubref/feedback_action.

How It Works

  • Form Fields: The fields presented in the public form are always derived from the fields definition of the action being referenced. No custom field definitions are needed for the form itself.
  • Access: The form is accessible via a URL pattern: /stubref/feedback_action, where stubref and feedback_action are defined in the action and public form configuration.
  • UUID Management: Each public form is managed as a UUID-based entity. Creation, update, and deletion of public forms is handled by the manage_public_forms task.

Example URLs

You can access public forms using URLs like:

  • https://forms.stubber.com/2026-03-18-STUB-TA9P/user_details
  • https://forms.stubber.com/3977b424-16b8-4495-9ef9-ab0171e3f2d0

Where the first segment is either a stub reference or a UUID, and the second segment (optional) is the feedback action.

Example Action with Public Form

        {
  "fields": {
    "array_field": { "fieldtype": "arraybuilder", ... },
    "currency_eurozone": { "fieldtype": "currency", ... },
    "currency_usd": { "fieldtype": "currency", ... },
    "dataindication_field": { "fieldtype": "dataindication", ... },
    "text_field": { "fieldtype": "text", ... },
    "smart_text_field": { "fieldtype": "smart_text", ... },
    "map_field": { "fieldtype": "map", ... },
    "file_field": { "fieldtype": "file", ... },
    "voicenote": { "fieldtype": "voicenote", ... }
  },
  "action_meta": {
    "public_form": {
      "enable": true
    }
  }
}

      

Defining Tasks for UUID-Based Public Forms

To manage public forms, define tasks using the manage_public_forms task type. Here are some examples:

Create a Public Form

        "create_public_form": {
  "tasktype": "manage_public_forms",
  "params": {
    "operation": "create",
    "public_form": {
      "feedback_action": "uuid_based_form"
    }
  }
}

      

Delete a Public Form

        "delete_public_form": {
  "tasktype": "manage_public_forms",
  "params": {
    "operation": "delete",
    "public_form": {
      "publicformuuid": "~~stubpost.data.publicformuuid"
    }
  }
}

      

You can also use the update operation to change the stubref or feedback_action of an existing public form by providing the publicformuuid and the fields to update.

Notes

  • Security: Public forms are accessible without authentication. Only enable for actions where this is appropriate.
  • Field Types: All field types supported by the action are supported in the public form.
  • Data Handling: Submitted data is posted to the action as if by an internal user, but with limited context.

References

  • Task: manage_public_forms
  • Model: app/models/public_form.js

For further details, see the code and comments in the referenced files.