GH-Elements

Barcode

Barcode is a gh-element that allows to generate the barcode based on the and displayed it in items.

Value Format

The barcode element does not have a field value.

Element Options

The element options consists of three groups of settings:

Field Settings

The first one is a standard group that described in Setting Overview.

Settings of barcode field

Code Generation Settings

The main settings are assembled in this block. They are responsible of the code generation.

Settings of barcode generation

Name Description
Static value allows you to choose whether the value is static or not; details...
Code text allows to enter the static value; details...
Field reference allows to select the field reference for barcode generation; details...
Code-type allows to select the type of the barcode; details...

Static Value

This is the function that allows you to select the type of value. If Static Value is true, the Code Text option appears where you can enter text to create a barcode in the settings. In the other case, you must select the field in the Field Reference option.

Code Text

This is the text that you enter in settings. It is used for generation the static barcode.

Field Reference

This is the selected in settings field whose value is used for dynamic barcode generation.

Code-Type

As the name implies, this is the type of barcode to be generated. You can choose from eleven types:

  • code39
  • code128A
  • code128B
  • code128C
  • pharmacode
  • itf
  • itf14
  • ean8
  • ean13
  • upcA
  • upcE

Element Style

The barcode style settings are mostly consists of standard option. All of them are described in detail in Setting Overview. And about element interpretation you can read in the end of this article.

Style of barcode element

General Settings

The barcode style settings differ from the standard ones in several options.

General settings of barcode style

Name Description
Font Size allows to set the size of the barcode font
Line Width allows to set the width of the barcode lines
Height allows to set the height of the barcode

Font Size

Some of the code types allows the barcode to be displayed with the text. You can change its font size due to this setting.

Line Width

This is the option that allows to customize the width of barcode lines.

Height

This is the option that allows to increase the barcode height.

Data Model

The barcode data model contains all the data about the code generation settings and its interpretation.

{
    "data_model": {
        "code_type": "pharmacode",
        "interpretation": [],
        "ref": {
            "field_id": "678459"
        },
        "static_mode": 1,
        "static_value": "barcode 1"
    }
}
Name Type Description
code_type string contains the type of code
interpretation array contains all interpretation types
ref object contains data about field reference
field_id string contains ID of source field for reference
static_mode boolean shows whether the static mode is on or not
static_value string contains the static value

Filtration

The only way to filter the barcode element is using Value filter.

Interpretation

The only interpretation type allows to display the generated barcode.

Types of barcode interpretation