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
| Attribute | Type | Description |
|---|---|---|
| input_type | string = number | The HTML input type attribute used for rendering the widget as a numeric input field. |
| template_name | string = django/forms/widgets/number.html | The 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
| Name | Type | Description |
|---|---|---|
| attrs | dict = null | A dictionary of HTML attributes to be added to the rendered input element, such as 'min', 'max', or 'step'. |