{
  "name": "bricks/form/response",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-form-response/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/form/response",
  "description": {
    "en": "Filters the JSON response sent to the browser after a Bricks form submission. This allows you to customize the success message, redirection URL, or add extra data to the response.",
    "zh": "Bricks 1.4 引入了 bricks/indexer/source/settings/controls_data 钩子，允许你修改自定义索引器数据源设置中控件的数据。"
  },
  "parameters": [
    {
      "name": "response",
      "type": "array",
      "type_zh": null,
      "description": {
        "en": "The response data array (e.g., ['type' => 'success', 'message' => '...', 'redirectUrl' => '...'] ).",
        "zh": "响应数据数组（例如 ['type' => 'success', 'message' => '...', 'redirectUrl' => '...']）。"
      }
    },
    {
      "name": "form",
      "type": "object",
      "type_zh": null,
      "description": {
        "en": "The Form integration instance.",
        "zh": "Form 集成实例。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/form/response', function( $response, $form ) {\n    // Example: Append a \"Thank you\" note to the success message\n    if ( isset( $response['type'] ) && $response['type'] === 'success' ) {\n        $response['message'] .= ' ' . esc_html__( 'Thank you for contacting us!', 'my-domain' );\n    }\n\n\n    return $response;\n}, 10, 2 );"
}