<?php

/**
 * Numeric input
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $wpcb_field;

echo '<input id="' . esc_attr( $wpcb_field_id ) . '" type="number" name="' . esc_attr( wpcb_sanitize_title( $wpcb_field['field']['label'] ) ) . '"';
wpcb_display_field_attributes( $wpcb_field );
echo ' autocomplete="off" />';

if ( isset( $wpcb_field['field']['unit'] ) && '' !== $wpcb_field['field']['unit'] ) {
	echo '<span class="wpcb-input-suffix">' . esc_attr( $wpcb_field['field']['unit'] ) . '</span>';
}
