Share a DFFS configuration between multiple forms

Forums Classic DFFS Share a DFFS configuration between multiple forms

Viewing 1 reply thread
  • Author
    Posts
    • #11883
      MikeH
      Participant

      This is a new feature available in DFFS v4.3.67 which builds on the ability to disable rules in specific forms. I had previously configured my Editform to be able to be used in the New & Display form of the same list but had to then import the Edit form config into each form. I also have another list that stores archived items from the main list and had a Display & Edit form on that list which also used that same Editform config. With this new feature, I am now able to share the one Editform config with the other 4 configs and no longer need to import that config into those forms & it works perfectly – just one form config to maintain instead of 5!

      I did this as follows to share the Editform from ANY list New or Display form:
      1) I created a new WebPart aspx code page in my SharePoint DFFS Folder called “DFFS_frontend_share_config_CEWP.js.aspx” which contains the following code:

      <script type=”text/javascript”>
      // Add DFFS_frontend_share_config_CEWP.js.aspx after OVERLAY Webpart to activate
      var listName = document.URL.split(“/”)[6].toLowerCase().replace(/%20/g,’ ‘);
      // Auto detect the Archive list to share Main List form – to share another list’s form specify the list names to find & to use instead
      if(listName.match(“archivelistname”) !== null){ listName = “mainlistname” }
      // Use the Shared EDIT form
      dffs_formIdOverride = “/lists/”+listName+”/editform.aspx”;
      </script>

      NOTE: The SPLIT location [6] above may be different as it depends on where the LISTNAME is in your site’s URL Address – mine is after the 6th slash (/) as shown here:
      http://sharepoint.company.com/sites/MySite/Lists/MainList/AllItems.aspx

      2) Next I added a new Content Editor WebPart (CEWP) to the Default Forms that I wanted to Share with the Editform. Note that if you do not want to share a form such as the Newform, do NOT put the CEWP on that default form. Sharing ONLY occurs on forms that have the Share CEWP.

      Place the new CEWP below the DFFS OVERLAY CEWP and use the link to the Aspx page created in Step 1 above.

      3) Once you do the above, when opened the New/Disp form will Share the Edit form config. You can then DELETE the DFFS config for the New/Disp form.

      Hope this helps!

    • #11889
      Alexander Bautz
      Keymaster

      Thank you for taking the time to document this feature.

      Best regards,
      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.