Load parent form with folders in "open" state on load
- This topic has 6 replies, 3 voices, and was last updated 10 years, 8 months ago by .
Viewing 4 reply threads
Viewing 4 reply threads
- You must be logged in to reply to this topic.
Home › Forums › vLooup for SharePoint › Load parent form with folders in "open" state on load
Is there a way to get a parent form to load a vLookup document library folder in the open state (showing files in the folder) when the form is loaded?
One other question about folders, is there a way to turn the “add folder” link off if one folder has been created? Thanks!
Hi,
Sorry, but this is not possible without custom code. You find a code example below.
To expand all first level folders, and remove the “new folder” link when one folder exists add this code to the custom js textarea:
function vLookupIsLoadedCallback(fin){
if(fin === "vLookupDocuments"){
if($("#dffs_vLookupDocuments").find("img.vLookupFolderIcon").length > 0){
$("#dffs_vLookupDocuments").find("img.vLookupFolderIcon").parent().click();
// Remove new folder link
$("#dffs_vLookupDocuments").find("div.vLookupAddNewFolderLabel").remove();
}
}
}
The field name “vLookupDocuments” must be replaced with the field you use in your setup.
Hope this helps,
Alexander
Thank you for this code! It works perfectly!
Is there any way to have the mouse-over state of the folder always on, so the upload button always shows? Is there a way to change the upload button image to text or a different image?
Hi,
Just add this to the custom css:
span.spjs_folder_btn{
display:inline!important;
}
To change the images, add this to the custom js:
spjs.vLookup.data.uploadImg = "/Path/to/the/image"; spjs.vLookup.data.folderIcon = "/Path/to/the/image";
Alexander
Thank you! This works perfectly!
This is perfect! Thank you both!