---
url: https://gudhub.com/docs/gh-elements/yes-no/
title: "Yes/No\n                #"
description: "Yes/No gh element is used then you need either strictly negative or strictly positive answer. This element is mostly used in different questionnaire and tests."
lang: uk
updated: 2026-09-11T17:39:02.656Z
---

# Yes/No [#](https://gudhub.com/docs/gh-elements/yes-no/#yes-no)

**Yes/No** gh-element is used then you need either strictly negative or strictly positive answer.

## Functional Characteristics [#](https://gudhub.com/docs/gh-elements/yes-no/#functional-characteristics)

This element is mostly used in different questionnaire and tests. For example, you can use it when you need the user to consent to the processing of personal data.

## Value Format [#](https://gudhub.com/docs/gh-elements/yes-no/#value-format)

The possible values of this element are in its data model as the value of the property is literally called _value_. Each of them has the certain name:

-   _Yes_

Copy

```json
{
    "field_value": "1"
}
```

-   _No_

Copy

```json
{
    "field_value": "0"
}
```

## Element Options [#](https://gudhub.com/docs/gh-elements/yes-no/#element-options)

Yes/No element does have standard Field Settings and has no additional settings.

![Settings of yes/no field](https://bitbucket.org/AAtlas/gudhub-documentation/raw/master/Gh_Elements/gh-elements/yes-no-field-settings.jpg "Yes/No field settings")

## Element Style [#](https://gudhub.com/docs/gh-elements/yes-no/#element-style)

As many gh-elements, this one has only standard options for its style. About each of them you can read in [Settings Overview](https://gudhub.com/docs/understanding-gudhub/gh-elements-structure/setting-overview/) and about its interpretation read [below](#interpretation).

![Style of yes/no element](https://bitbucket.org/AAtlas/gudhub-documentation/raw/master/Gh_Elements/gh-elements/yes-no-element-style.jpg "Yes/No element style")

## Data Model [#](https://gudhub.com/docs/gh-elements/yes-no/#data-model)

The main distinctive feature of this gh-element is an array of the only two values.

Copy

```json
{
    "data_model": {
        "default_field_value": 0,
        "interpretation": [],
        "options": [{
            "name": "Yes",
            "value": 1
            },
            {
            "name": "No",
            "value": 0
        }],
        "use_default_value": 0
    }
}
```

| Name | Type | Description |
| :-- | :-- | :-- |
| default\_field\_value | `number` | _contains default value of the element_ |
| interpretation | `array` | _contains all element interpretations_ |
| options | `array` | _contains both element options_ |
| name | `string` | _name of the option_ |
| value | `number` | _value of the certain option_ |
| use\_default\_value | `boolean` | _shows whether the default value is used or not_ |

## Filtration [#](https://gudhub.com/docs/gh-elements/yes-no/#filtration)

Since yes/no element has only two values, it can be filtered by not a big variety of filters.

-   [Equals(or)](https://gudhub.com/docs/core-api/filter/equals/)
-   [Not equals(or)](https://gudhub.com/docs/core-api/filter/equals/)
-   [Value](https://gudhub.com/docs/core-api/filter/value/)

## Interpretation [#](https://gudhub.com/docs/gh-elements/yes-no/#interpretation)

Despite of its simplicity, this element is very useful tool. So it needs lots of interpretations.

![Types of yes/no interpretation](https://bitbucket.org/AAtlas/gudhub-documentation/raw/master/Gh_Elements/gh-elements/yes-no-interpretation-types.jpg "Yes/No interpretation types")

### Default [#](https://gudhub.com/docs/gh-elements/yes-no/#default)

The default interpretation of yes/no element allows to display it as a field with a drop-down list of two values.

### Checkbox [#](https://gudhub.com/docs/gh-elements/yes-no/#checkbox)

It displays a small checkbox. When it is checked, the value is 'Yes'. When it is not, the value is 'No'.

### Switch [#](https://gudhub.com/docs/gh-elements/yes-no/#switch)

This interpretation allows to display switch. When it is on, the value is 'Yes'. When it is off, the value is 'No'.

### Plain Text [#](https://gudhub.com/docs/gh-elements/yes-no/#plain-text)

This is the interpretation type that allows to set a value and does it uneditable.

### Plain Text Symbol [#](https://gudhub.com/docs/gh-elements/yes-no/#plain-text-symbol)

Allows to display uneditable symbol for true value.

### Value [#](https://gudhub.com/docs/gh-elements/yes-no/#value)

The last interpretation type displays the field value.
