# How to hide one field

**URL:** <https://jsonforms.discourse.group/t/how-to-hide-one-field/134>\
**Category:** General\
**Created:** [June 25, 2020, 7:34pm UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134 "2020-06-25T19:34:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [June 25, 2020, 7:34pm UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/1 "2020-06-25T19:34:03Z")

</div>

Is there any way to hide one particular field?

_[[original thread](https://spectrum.chat/jsonforms/general/how-to-hide-one-field~df7b9c1e-0250-4a74-91a3-e75e3c517a78) by Tanya Gamarian]_

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [June 26, 2020, 6:05am UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/2 "2020-06-26T06:05:48Z")

</div>

Hi @ohtanya, you can provide your own ui schema and just don’t include a control for the specific field. Let’s say this is your JSON schema:

```auto
{
  type: 'object',
  properties: {
    name: {
      type: 'string',
      minLength: 3,
    },
    vegetarian: {
      type: 'boolean'
    },
    birthDate: {
      type: 'string',
      format: 'date',
    },
  }
}

```

You could then use the following ui schema to “hide” the `birthDate` field by not specifying a `Control` for it.

```auto
{
  type: 'HorizontalLayout',
  elements: [
    {
      type: 'Control',
      scope: '#/properties/name'
    },
    {
      type: 'Control',
      scope: '#/properties/vegetarian'
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![maltrkawi](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/maltrkawi/32/226_2.png) [@maltrkawi](https://jsonforms.discourse.group/u/maltrkawi)\
**Post date:** [December 29, 2021, 12:29pm UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/3 "2021-12-29T12:29:41Z")

</div>

Dears,  
What about the need to have a hidden field (by default) that gets displayed based on some rule?

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [January 3, 2022, 9:44am UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/4 "2022-01-03T09:44:29Z")

</div>

Hi @maltrkawi, you can [take a look](https://jsonforms.io/examples/rule) at our [`SHOW/HIDE` rules](https://jsonforms.io/docs/uischema/rules).

---

<div class="post-metadata">

**Author:** ![mingfang](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/mingfang/32/234_2.png) [@mingfang](https://jsonforms.discourse.group/u/mingfang)\
**Post date:** [January 10, 2022, 2:31am UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/5 "2022-01-10T02:31:35Z")

</div>

What condition can I set to HIDE always?

---

<div class="post-metadata">

**Author:** ![mingfang](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/mingfang/32/234_2.png) [@mingfang](https://jsonforms.discourse.group/u/mingfang)\
**Post date:** [January 10, 2022, 2:51am UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/6 "2022-01-10T02:51:11Z")

</div>

I found the solution.

```auto
    "rule": {
        "effect": "HIDE",
        "condition": {}
     }

```

---

<div class="post-metadata">

**Author:** ![Harut](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@Harut](https://jsonforms.discourse.group/u/Harut)\
**Post date:** [July 10, 2025, 10:34am UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/7 "2025-07-10T10:34:16Z")

</div>

Hi @sdirix, are there any possibilities to exclude the hidden input’s value from the form object?  
I’ve managed to HIDE/SHOW inputs depending on conditions, but the input’s default value is included anyway

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [July 14, 2025, 8:34am UTC](https://jsonforms.discourse.group/t/how-to-hide-one-field/134/8 "2025-07-14T08:34:39Z")

</div>

Hi @Harut,

This is not something we support out of the box. In principle we want to avoid modifying data just by rendering. See also these past threads for more information:

- [Advice on clearing down data on hiding a Group](https://jsonforms.discourse.group/t/advice-on-clearing-down-data-on-hiding-a-group/410)
- [Clearing hidden fields](https://jsonforms.discourse.group/t/clearing-hidden-fields/234)
