Reusable Content
EnterpriseReusable Content lets you store common HTML blocks, Custom JS snippets, and Custom CSS snippets in a central library and insert them into any form across the tenant. Edit the source once and every form that references it updates automatically.
Everything that reads the central site requires an active Enterprise license — reusable content, the default tenant theme, global Custom CSS and JavaScript, the managed AI relay, and cross-site-collection Related Items. The check runs every time a form loads, not only in the configuration UI.
- A site that is not on Enterprise never contacts the central site at all — not to read settings, not to check whether it exists. Nothing appears in the browser console, because nothing is ever requested.
- If a site’s Enterprise license expires, is downgraded, or its trial runs out, it stops using the central site on the next form load — even though the central site itself is still there and readable. The entitlement is gone, not the site.
- The form keeps rendering and keeps saving. Nothing is deleted or rewritten, so no configuration is lost, and re-licensing restores everything on the next form load.
These are not available as Professional add-ons — see Pricing & editions.
1. The three content types
| Type | What it does |
|---|---|
| Form element | Inserts a shared HTML block as a form element in the layout. |
| Custom JS snippet | Appends a shared JavaScript snippet to the form’s own Custom JS. |
| Custom CSS snippet | Appends a shared CSS snippet to the form’s own Custom CSS. |
Content can be stored inline (the text lives in the library item) or as a URL pointing to a file. For JS and CSS references the URL must point to a file in a DFFS_Assets document library — either on the central site (see Section 2) or the local site. External / third-party URLs (public CDNs or any other domain) are not permitted; host the file in DFFS_Assets and reference it from there.
2. Central vs. local libraries
There are two libraries, both backed by a SharePoint list named ReusableContent:
- Central library — lives on the central site and is shared by every site collection that resolves to it. Managed by users with edit permission on the central list.
- Local library — a per-site
ReusableContentlist. Useful for content that only applies to one site.
When you add reusable content to a form, you pick from both libraries in the picker.
Where the central site lives — hubsite or tenant fallback
The “central site” is not a single fixed location anymore. DFFS resolves it automatically, per site collection, on each page load:
| Central location | When it’s used |
|---|---|
| A connected hubsite | The current site collection is joined to a hubsite and that hub’s root web has a DFFS_Settings list. The hub then provides the central ReusableContent, DFFS_Settings, DFFS_Assets, and the cross-site-collection Related Items broker for every site joined to it. |
Tenant site /sites/ModernDFFS_Central | The current site is not joined to a hubsite, or the joined hub has no DFFS_Settings list. This is the tenant-wide fallback. |
This lets a department or division that owns a hubsite keep its own central reusable content, settings, and license on the hub, while sites outside any DFFS-enabled hub fall back to the single tenant-wide ModernDFFS_Central site.
A few things worth knowing as a form designer:
- It’s transparent in the picker. Whether central content comes from a hub or the tenant site, it shows up the same way under the central library — you don’t choose the location.
- Resolution is cached per session (keyed by the current site collection), so the lookup runs at most once per session per site, not on every form open.
- The location is never stored in the form configuration. A form config copied to another site collection automatically uses whatever central site is correct for its new home — it never carries a stale hub URL with it. This means the same config can resolve to a hub’s central library on one site and the tenant site on another.
Provisioning a hub as the central location is an admin task — either the central site provisioning script with
-HubUrl …or the equivalent manual steps. See the Enterprise central site setup guide.
Where the license comes from
The Enterprise entitlement described at the top of this page is itself resolved from a license code, and DFFS looks for one in a fixed order:
- The
DFFS_LICENSElist on the current site. If itsLicenseCodefield holds a value, that value is used and the central site is never contacted. - The
DFFS_Settingslist on the central site — the item withTitle = DFFS_License. Used when the local list is missing or its code is empty. - Neither found → DFFS creates a local
DFFS_LICENSElist, the standard first-run behavior.
Step 2 is the one central read that can happen before the tier is known — the tier can’t gate the very lookup that determines it. A site that reaches step 2 and finds no central site caches that result for the browser session, so it is attempted at most once per session rather than on every form load.
A leftover local code silently opts a site out of central licensing. If your organization licenses centrally but one site still has an old code in its
DFFS_LICENSElist, step 1 wins: that site is not treated as centrally licensed, won’t pick up the central license, and won’t show your internal support contact. The fix is to clear theLicenseCodefield on the local list item so the site falls through to the central license.
The internal support contact is the one exception
Every central setting above is Enterprise-gated. SupportContactName, SupportContactEmail and SupportContactURL are not: they are read for any site whose license comes from the central site, at any tier — including a license that no longer validates.
This is deliberate. Those settings exist to replace the SPJSWorks link in license error and expiry banners with your own help desk, and an expired or downgraded license is precisely when that banner appears and precisely when a user needs to know who to contact internally. What matters is how the license was delivered, not whether it currently validates:
| Situation | Support contact read from central? |
|---|---|
| Central license, valid Enterprise | Yes |
| Central license, expired / downgraded / wrong site collection | Yes — this is the case the exception exists for |
| No central license entry, or no central site | No |
Site holds its own local DFFS_LICENSE code | No — the site is not centrally licensed |
3. Live content (important behavior)
Reusable Content elements fetch live from the source list on every form load. The form only stores a reference (the list item ID and source), not a copy of the HTML.
- ✅ Edit the source item in the library → the change appears in all forms that reference it, with no reconfiguration.
- ⚠️ Delete the source item → the element shows an error message in its place instead of stale content.
4. Dependencies — loading extra JS/CSS files
A Reusable Content item can declare dependencies: the JS and CSS files it needs in order to work. The Dependencies field is a plain multiline text box — paste file URLs, one per line.
Important: dependency URLs must point to files in a
DFFS_Assetsdocument library — either on the central site (the tenantModernDFFS_Centralsite or a connected hubsite, see Section 2) or the local site. External / third-party URLs (public CDNs or any other domain) are deliberately rejected. If you need a third-party library, upload it toDFFS_Assetsfirst and reference it from there.
# Charting library hosted in the central DFFS_Assets library
# (here the tenant central site; on a hub-connected site this would be the hub's DFFS_Assets)
https://contoso.sharepoint.com/sites/ModernDFFS_Central/DFFS_Assets/libs/chart.min.js
https://contoso.sharepoint.com/sites/ModernDFFS_Central/DFFS_Assets/libs/chart-theme.css
# a helper hosted in the local site's DFFS_Assets library
https://contoso.sharepoint.com/sites/Projects/DFFS_Assets/dashboard-helpers.js- Lines starting with
#are treated as comments and ignored. - At runtime each URL is injected into the page once:
.jsURLs become<script src>tags and.cssURLs become<link rel="stylesheet">tags. - A DOM-id guard prevents the same file being injected twice across multiple forms on the same page.
5. Adding reusable content to a form
- In the form builder, open the place you want the content:
- Form element → use the + Add reusable content toolbox option in the layout.
- Custom JS / Custom CSS snippet → use the Add from library button in the Custom JS or Custom CSS tab.
- Pick an item from the central or local library.
- Save the form. The reference is stored; the live content loads on next open.
If the library is reachable but has no items of the relevant type, you’ll see a muted “No reusable content found” label where the Add from library button would normally appear.
6. Promoting content to the library
Promote a placed local element to the central library
Right-click a local reusable content element already placed in a form and choose Promote to central library. The promote dialog includes:
- Title (pre-filled)
- Description (pre-filled from the local item)
- Category (dropdown of existing central categories, with smart pre-selection and a New category… option)
Any local DFFS_Assets URLs in the Dependencies field are automatically rewritten to point at the central library during promotion.
Promote a plain HTML section as reusable content
Right-click a normal HTML section → Promote as reusable content. The dialog includes Title, Description, and Category (populated from both central and local categories), and lets you choose the target library:
- If no local
ReusableContentlist exists yet, selecting This site shows an inline warning with a Create local list button that provisions the list before the save proceeds.
7. Handling a missing local item (stale references)
If a form configuration that references a local reusable content item is opened on a site where the local ReusableContent list doesn’t exist — for example a config copied from DEV or UAT — the placed element renders a red warning card in the form builder (instead of the normal locked skeleton).
- The card explains the problem and, if you have permission, offers an inline Create local list button to provision the list without leaving the builder.
- The Edit in local library action (toolbar icon and context-menu item) is hidden for stale items.
- Choosing Promote to central library on a stale item shows an informative dialog explaining the item wasn’t found on this site.
8. Worked example — a shared compliance footer
Goal: Show the same legal/compliance footer on every form in the tenant, editable in one place.
- On the central site — the tenant
ModernDFFS_Centralsite, or the hubsite that serves as the central location for your site collection (see Section 2) — open the ReusableContent list and create an item:- RcType: Form element
- Title:
Compliance footer - Category:
Shared blocks - Content: your footer HTML, e.g.
<div class="compliance-footer"> Handled under policy DOC-2024-11. Questions? <a href="mailto:compliance@contoso.com">compliance@contoso.com</a> </div> - Dependencies: (optional) a CSS file in
DFFS_Assets(central or local site) that styles.compliance-footer.
- In any form, use + Add reusable content and pick Compliance footer.
- Later, edit the footer text in the central list — every form picks up the new text on next open.