<?php

namespace GriffinForms\Includes\Integrations\FormControls;

class Hidden extends Format
{
    public function render(): string
    {
        $html_id = esc_attr($this->getHtmlId());
        $field_name = esc_attr($this->getFieldName());
        $value = esc_attr((string) $this->field_value);

        return sprintf(
            '<input type="hidden" id="%s" name="%s" value="%s" />',
            $html_id,
            $field_name,
            $value
        );
    }
}
