<?php
$hidden_field_type = $field_details['hidden_field_type'];
global $std_library;
switch ($hidden_field_type) {
    case 'current_page_url':
        $hidden_value = $std_library->get_current_page_url();
        break;
    case 'user_ip':
        $hidden_value = $std_library->get_user_IP();
        break;
    case 'request':
        if (!empty($field_details['url_parameter_key'])) {
            $hidden_value = (!empty($_REQUEST[$field_details['url_parameter_key']])) ? sanitize_text_field($_REQUEST[$field_details['url_parameter_key']]) : '';
        } else {
            $hidden_value = '';
        }
        break;
    case 'prefilled':
        $hidden_value = $field_details['pre_filled_value'];
        break;
}

?>
<input type="hidden" name="<?php echo esc_attr($field_name); ?>" value="<?php echo esc_attr($hidden_value); ?>" />