A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/form/avatar/ below:

Website Navigation


JavaScript Form - Avatar | DHTMLX Suite 9 Docs

Avatar

A compact but useful control for swift uploading of an avatar into a form.

Related sample: Form. All controls

Related sample: Form. Avatar

Adding Avatar​

You can easily add an Avatar control during initialization of a form:

const form = new dhx.Form("form_container", {
rows: [
{
type: "avatar",
name: "avatar",
required: true,
labelWidth: 140,
label: "Employee photo",
labelPosition: "top",
placeholder: "Add a photo",
value: {
src: "https://server.domain/upload/image.jpg"
}
}
]
});
Properties​

View the full list of configuration properties of the Avatar control.

Working with Avatar​

You can manipulate an Avatar control by using methods or events of the object returned by the getItem() method.

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

const value = form.getItem("avatar").getValue();
Methods​

Check the full list of methods of the Avatar control.

Events​

Check the full list of events of the Avatar control.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4