SimpleVault
A control for uploading a file or a set of files.
Related sample: Form. All controls
Related sample: Form. Simple Vault
Adding SimpleVault
You can add a SimpleVault control during form initialization:
const 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 SimpleVault configuration properties.
Working with SimpleVault
You can manage a SimpleVault 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("simplevault").getValue();
Methods
Check the full list of SimpleVault methods.
Events
Check the full list of SimpleVault events.
Using DataCollection API
You can manage a SimpleVault control with the DataCollection API.
For example, you can remove one or all files from the list. Apply the remove or removeAll method of DataCollection to the object that the getItem() method returns:
form.getItem("simplevault").data.remove("file_id");
form.getItem("simplevault").data.removeAll();
Uploading files
You can read about uploading files to a SimpleVault control in the Vault documentation.