Skip to main content

SimpleVault

A handy control for quick and easy uploading of a file or a set of files.

SimpleVault control

Related sample: Form. All DhxForm Inputs

Related sample: Form. Simple Vault

Adding SimpleVault#

You can easily add a SimpleVault control during initialization of a form:

var form = new dhx.Form("form_container", {    rows: [        {            type: "simpleVault",            name:"simplevault",            label: "i am simpleVault",            labelWidth: "120px",            labelPosition: "left",            disabled: false,            required: false        }    ]});

Properties#

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

Working with SimpleVault#

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

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

var value = form.getItem("simpleVault").getValue();

Methods#

Check the full list of methods of the SimpleVault control.

Events#

Check the full list of events of the SimpleVault control.

Using DataCollection API#

You can manipulate a SimpleVault control with the help of the DataCollection API.

For example, you can remove one or all files from the list. To do that, you need to apply the remove, or removeAll method of DataCollection to the object returned by the getItem() method as follows:

form.getItem("simpleVault").data.remove("file_id");
form.getItem("simpleVault").data.removeAll();

Uploading files#

You can read about uploading files into a SimpleVault control in the related article.