Home › Forums › Classic DFFS › SP13 Apps Web Part (List) to Tab
Tagged: sharepoint 2013, web part
- This topic has 2 replies, 3 voices, and was last updated 4 years ago by
Keith Hudson.
-
AuthorPosts
-
-
January 21, 2021 at 19:21 #32534
Alex,
My old display form in SP2013 had a few Apps Web Parts located on the form which pointed to various lists.
Now that I have deployed DFFS is there a way to add those list web parts to the form (s) (in DFFS) so they show up on a specific tab? So, for example on my Deliverables tab I want my Deliverables list to show up under that tab.
I’ve been successful in adding the list web part to the form but it shows up on each tab which is not what I desire. Looking through the DFFS configuration window I do not see anything pointing to the web part I have added to the current Display view.
Thanks.
Paul
-
January 22, 2021 at 20:57 #32564
Hi,
If you want to include a list view web part in your form you must could use some custom js to show it in one specific tab.I haven’t done this myself, but if you inspect the list view and find an ID of one of the outer elements in the view you can add this to your custom js:
(function(){ var yourCustomElemetID = "The_id_you_get_from_inspect"; // Hide initially jQuery("#" + yourCustomElemetID).hide(); var isHidden = true; setInterval(function(){ var sTab = spjs.dffs.data.selectedTab; if(sTab === 2){ if(isHidden){ jQuery("#" + yourCustomElemetID).show(); isHidden = false; } }else{ if(!isHidden){ jQuery("#" + yourCustomElemetID).hide(); isHidden = true; } } },250); })();
Replace The_id_you_get_from_inspect with the ID you find from the inspect of the list view and the 2 in if(sTab === 2) to the index of the tab you want to show it in.
Please note that I haven’t tested this code – it is just written freehand here so It might need some tweaking.
Alexander
-
January 27, 2021 at 01:14 #32604
This worked great, no tweaking needed! Very cool! Thank you.
-
-
AuthorPosts
- You must be logged in to reply to this topic.