---
title: "Hidden input"
date: "2023-10-05T01:20:42+00:00"
summary: "Discover how to implement hidden input fields in your forms with our comprehensive guide. Learn to enhance user experience and data handling while maintaining form simplicity and efficiency."
image:
type: "page"
url: "/drupal-starter-kits/add-ons/site-studio/hidden-input"
id: "f7fbc2c8-8db7-4fb2-a801-732d5e0027c4"
---

Schema:

    {
      "type": "object",
      "properties": {
        "type": {"type": "string", "pattern": "^form-field$"},
        "id": {"type": "string", "pattern": "^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$"},
        "machine_name": {"type": "string"},
        "data": {
          "type": "object",
          "properties": {
            "uid": {"type": "string","pattern": "^form-input-hidden$"},
            "title": {"type": "string"},
            "value": {"type": "string"}
          }
        }
      },
      "required": ["id", "type", "data"]
    }
    

Example output:

Given "Hidden input" form element on a component set up like so

![31e870e6-Screenshot%202023-12-06%20at%2002.10.53.png](https://acquia.widen.net/content/a9a5e6e3-35c8-4bee-8e4f-e3aee5d543ec/web/31e870e6-Screenshot%202023-12-06%20at%2002.10.53.png)

And used on Node layout canvas like so

![b4949b80-Screenshot%202023-12-06%20at%2002.11.56.png](https://acquia.widen.net/content/208cead2-23fe-40d2-bf8d-e3caf806387a/web/b4949b80-Screenshot%202023-12-06%20at%2002.11.56.png)

    {
      "type": "form-field",
      "id": "c8a1af05-068f-4825-86d4-dd3c89943946",
      "machine_name": "hidden-input",
      "data": {
        "uid": "form-input-hidden",
        "title": "Hidden input",
        "value": "Default value"
      }
    }