logo
search
SharePoint Document Issues

Fix Cannot Embed a SharePoint New Form in a Web Part Page

Algirdas JasaitisAlgirdas Jasaitis Sep 27, 2026 869 views

Question details

Users are unable to successfully embed a SharePoint New Form into a Web Part Page because the URL automatically disappears from the Page Viewer properties after saving.

How to Fix SharePoint New Form Embedding Issues in Web Part Pages
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Attempting to embed a SharePoint list's New Form view into a classic or modern page using the Page Viewer or List web part.
Observed behavior
The form link works when accessed directly, but the URL is stripped or removed entirely when reopening the Page Viewer properties. No error messages are displayed during this process.
Before you start

Ensure you have Site Owner or Microsoft 365 Global Administrator privileges, as resolving this issue requires checking tenant-level script settings and site security configurations.

Solution 1Recommended

Enable Custom Script in SharePoint Admin Center

Use this solution to resolve restrictions that block web parts from retaining specific URLs and custom code.

SharePoint security features often block certain URL embeddings in web parts to prevent malicious code execution. Enabling Custom Scripts at the tenant level allows these web parts to function properly and retain the form URL.

1
Access SharePoint Admin Center

Log in to the Microsoft 365 Admin Center as a Global Administrator, navigate to 'Admin centers' in the left pane, and select 'SharePoint'.

2
Navigate to Settings

In the SharePoint Admin Center, click on 'Settings' from the left-hand navigation menu. You may need to click 'Classic settings page' at the bottom if the option is hidden.

3
Enable Custom Script

Scroll down to the 'Custom Script' section. Select 'Allow users to run custom script on personal sites' and 'Allow users to run custom script on self-service created sites'.

4
Save and Wait

Click 'OK' to save the settings. Please note that it can take up to 24 hours for this change to fully propagate across your organization's SharePoint environment.

Enable Custom Script in SharePoint Admin Center
Propagation Delay: Changes to Custom Script settings are not immediate and strictly require a wait time of up to 24 hours before the Page Viewer web part will accept the URL.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Collaboration

While resolving complex SharePoint configuration issues, you can rely on WPS Office for a lightweight, highly compatible alternative for managing your team's documents, spreadsheets, and presentations. It's completely free to download and works perfectly with all Microsoft Office file formats.

  1. 1. Visit the official website: Go to the official WPS Office website to access the secure download.
  2. 2. Download the software: Click the 'Free Download' button to get the latest installation package for your operating system.
  3. 3. Install and collaborate: Run the installer, open WPS Office, and immediately start working on your DOCX, XLSX, and PPTX files without compatibility issues.
Fully compatible with Microsoft Office formats (Word, Excel, PowerPoint)Lightweight installation and incredibly fast loading timesBuilt-in PDF editing, conversion, and annotation toolsFamiliar user interface for a seamless migration with zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why does the URL disappear from the Page Viewer web part without any errors?

This is typically caused by SharePoint's security features, such as disabled Custom Scripts or restrictive HTML Field Security policies. When these are active, SharePoint silently strips out iframe URLs to prevent unauthorized code execution.

How long does it take for Custom Script settings to take effect?

Once modified in the SharePoint Admin Center, Custom Script settings can take up to 24 hours to fully propagate and apply to all site collections in your Microsoft 365 tenant.

Does this URL embedding issue affect modern SharePoint pages as well?

Yes, although the issue is highly common in classic web part pages, tenant-wide security restrictions like disabled Custom Scripts and HTML Field Security limits can also block form embedding on modern SharePoint pages.

What permission level is required to embed a form in a web part?

To successfully edit web part pages and configure properties like URLs, the user must have at least 'Design' or 'Full Control' permissions on the specific SharePoint site.