---
url: https://gudhub.com/docs/gh-elements/voting/
title: "Voting\n                #"
description: "Voting is a comfortable tool for automatic calculation of the users votes and save the information about that. The vote is counted only after clicking on the ic"
lang: uk
updated: 2026-09-11T10:02:03.055Z
---

# Voting [#](https://gudhub.com/docs/gh-elements/voting/#voting)

**Voting** is a comfortable tool for automatic calculation of the users votes and save the information about that. The vote is counted only after clicking on the icon.

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

Use this element to vote for any topic. It's also handy for collecting likes under posts.

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

The value of the voting element are the IDs of the user who had voted, separated by commas.

Copy

```json
{
    "field_value": "1547"
}
```

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

The voting options consists of one group - Field Settings. It contains its own unique set of options.

### Field Settings [#](https://gudhub.com/docs/gh-elements/voting/#field-settings)

The main settings of configuration the voting element are contained here. Two of them are the standard Field Name and Name Space.

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

| Name | Description |
| :-- | :-- |
| Icon | allows to select icon which will be displayed; [details...](#icon) |
| Show Legend | allows users to see others who voted; [details...](#legend) |
| Icon Color | allows to select icon color; [details...](#icon-color) |

#### **Icon** [#](https://gudhub.com/docs/gh-elements/voting/#icon)

This button allows to open the catalogue of different icons and to select which of them will be displayed in application.

#### **Legend** [#](https://gudhub.com/docs/gh-elements/voting/#legend)

The legend is a list of users who voted. It is displayed in application as a black popup list with users names and icons.

#### **Icon Color** [#](https://gudhub.com/docs/gh-elements/voting/#icon-color)

This option allows you to set the color of the icon with the help of color picker.

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

As you can see, this element does not have special options of its style, only have standard settings about that you can read in [Setting Overview](https://gudhub.com/docs/understanding-gudhub/gh-elements-structure/setting-overview/). As for its interpretations, they are described [below](#interpretation).

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

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

This element has quite big data model. Part of its properties related to the icon.

Copy

```json
{
    "data_model":{ 
        "icon": "love_heart",
        "icon_color": "#18a9e8",
        "interpretation": [],
        "min_digits_count": -1,
        "show_legend": 1
    }
}
```

| Name | Type | Description |
| :-- | :-- | :-- |
| icon | `string` | _name of selected icon_ |
| icon\_color | `string` | _selected color of icon_ |
| interpretation | `array` | _contains all interpretation types of voting_ |
| min\_digits\_count | `number` | _minimum number of digits_ |
| show\_legend | `boolean` | _shows voting legend is displayed or not_ |

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

Since the voting element always has a value, it can be filtered out by only that filters that search by comparing full values.

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

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

The voting element has only three types of interpretation.

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

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

The default type allows users to vote and accordingly update the value.

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

This interpretation allows only display the number of votes. Namely, it makes the element uneditable.

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

The last interpretation type displays the value of the field.
