SP13 Apps Web Part (List) to Tab

Home Forums Classic DFFS SP13 Apps Web Part (List) to Tab

Viewing 2 reply threads
  • Author
    Posts
    • #32534
      Paul Seeger
      Participant

        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

      • #32564
        Alexander Bautz
        Keymaster

          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

        • #32604
          Keith Hudson
          Participant

            This worked great, no tweaking needed! Very cool! Thank you.

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.