Skip to main content

Textarea

A control that allows users to enter multi-line text.

Textarea form control with a label and a multi-line text value in DHTMLX Suite

Related sample: Form. All controls

Related sample: Form. Textarea

Adding Textarea​

You can add a Textarea control during form initialization:

const form = new dhx.Form("form_container", {
rows: [
{
type: "textarea",
name:"textarea",
label: "textarea",
labelWidth: "70px",
value: "Some nice text",
width:400
}
]
});

Properties​

View the full list of Textarea configuration properties.

Working with Textarea​

You can manage a Textarea control with the methods and events of the object that the getItem() method returns.

For example, you can get the value of the control:

const value = form.getItem("textarea").getValue();

Methods​

Check the full list of Textarea methods.

Events​

Check the full list of Textarea events.