protected function createHidden($name, $value = null)
    {
        $field = Former::hidden($this->inputName($name))->class('input-'.$name);
        if ($value) {
            if (!is_scalar($value)) {
                $value = json_encode($value);
            }
            $field->forceValue($value);
        }

        return $field->render();
    }