{
  "name": "bricks/element/form/honeypot/result",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-element-form-honeypot-result/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/element/form/honeypot/result",
  "description": {
    "en": "Filters the result returned when a honeypot field is triggered (spam detection). This allows you to customize the error message shown to potential bots (or users who accidentally filled the hidden field).",
    "zh": "使用此筛选器可注册自定义元素并扩展 Bricks 元素库。"
  },
  "parameters": [
    {
      "name": "result",
      "type": "array",
      "type_zh": null,
      "description": {
        "en": "The result array, typically containing ['type' => 'error', 'message' => '...'] .",
        "zh": "结果数组，通常包含 ['type' => 'error', 'message' => '...']。"
      }
    },
    {
      "name": "field_id",
      "type": "string",
      "type_zh": null,
      "description": {
        "en": "The ID of the honeypot field that was filled.",
        "zh": "已被填写的 honeypot 字段的 ID。"
      }
    },
    {
      "name": "form",
      "type": "object",
      "type_zh": null,
      "description": {
        "en": "The Form integration object.",
        "zh": "Form 集成对象。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/element/form/honeypot/result', function( $result, $field_id, $form ) {\n    // Customize the error message\n    $result['message'] = esc_html__( 'Spam detected. Please do not fill out the hidden fields.', 'my-domain' );\n\n\n    return $result;\n}, 10, 3 );"
}