Skip to main content

Textarea

This class represents an HTML < textarea > widget used for multi-line text input in web forms. It extends the base widget functionality by providing default dimensions of 40 columns and 10 rows while allowing for custom attribute overrides. The class utilizes a specific template for rendering the multi-line input field within a user interface.

Attributes

AttributeTypeDescription
template_namestring = django/forms/widgets/textarea.htmlThe path to the HTML template used to render the textarea widget.

Constructor

Signature

def Textarea(
attrs: dict = None
) - > null

Parameters

NameTypeDescription
attrsdict = NoneA dictionary containing HTML attributes to be set on the rendered widget.

Signature

def Textarea(
attrs: dict = None
) - > null

Parameters

NameTypeDescription
attrsdict = NoneA dictionary of HTML attributes to be set on the rendered textarea element, such as 'cols', 'rows', or 'placeholder'.