DHTMLX Docs & Samples Explorer

Add Form Fields

Use setFormField(fieldName,value) method to add your own fields to the form. It will be sent to the server together with file content, so you can pass some data to your server script.
You can call this method only after the create() method, when the object is instantiated on the page.
You may call this method with value null to remove corresponding field from the form.

Source
<div id="vaultDiv"></div> <script> vault=new dhtmlXVaultObject(); vault.setImagePath("codebase/imgs/"); vault.setServerHandlers("UploadHandler.php", "GetInfoHandler.php", "GetIdHandler.php"); vault.create("vaultDiv"); vault.setFormField("customerId", "PS104"); vault.setFormField("country", "UK"); vault.setFormField("groupId", null); // will remove this field from the form </script>