public function render() {
        if ($this->parent) {
            if (!static::$count[$this->parent])
                static::$count[$this->parent] = 0;
            static::$count[$this->parent] ++;

            $this->attributes->id += static::$count[$this->parent];
        }
        ob_start();
        ?>
        <div class="element-group <?= $this->type ?> <?= $this->errors ? 'form-error' : null ?>">
            <?php if ($this->options->label): ?>
                <label for="<?= $this->attributes->id ?>"><?= $this->options->label ?></label>
            <?php endif; ?>
            <?= $this->prepare() ?>
        </div>
        <?php
        return ob_get_clean();
    }