Skip to main content

NumberInput

This class represents an HTML number input widget for forms, specifically designed to handle numerical data entry. It inherits from the base input class and utilizes a specialized template for rendering the number-specific input type.

Attributes

AttributeTypeDescription
input_typestring = numberThe HTML input type attribute used for rendering the widget as a numeric input field.
template_namestring = django/forms/widgets/number.htmlThe file path to the Django HTML template used to render the number input widget.

Constructor

Signature

def NumberInput() - > null

Signature

def NumberInput(
attrs: dict = null
) - > null

Parameters

NameTypeDescription
attrsdict = nullA dictionary of HTML attributes to be added to the rendered input element, such as 'min', 'max', or 'step'.