Fix Cannot Embed a SharePoint New Form in a Web Part Page
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.

- 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.
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.
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.
Log in to the Microsoft 365 Admin Center as a Global Administrator, navigate to 'Admin centers' in the left pane, and select 'SharePoint'.
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.
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'.
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.

Review HTML Field Security Settings
Ensure that your SharePoint site is permitted to display external or internal form domains inside an iframe.
Verify Permissions and Escalate to Support
Check for correct design permissions and escalate to Microsoft if backend server anomalies are causing the URL drop.
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. Visit the official website: Go to the official WPS Office website to access the secure download.
- 2. Download the software: Click the 'Free Download' button to get the latest installation package for your operating system.
- 3. Install and collaborate: Run the installer, open WPS Office, and immediately start working on your DOCX, XLSX, and PPTX files without compatibility issues.

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.




