Modern list no longer navigates to customised classic new/edit/display list forms
Category
- [x] Bug
Describe the bug
On a modern list that has customised (classic) new/edit/display list forms, clicking New or clicking the Title column value or selecting Edit does not load the customised list form, instead it opens the details panel.
Previously the customised (classic) list form was opened instead. This happens whether the list view has a custom JSON formatter applied or not.
If the list view has a custom JSON format applied, the defaultClick and editProps actions of customRowAction used to navigate to the (classic) customised list forms, now they just open the details panel instead.
Steps to reproduce
- Create a new modern list
- Customise the New/Edit/Display list forms by adding 1 or more webparts to the classic list form pages
Expected behavior
- Click New from the command bar should open the lists customised (classic) New form page
- Select an item and choose Edit should open the lists customised (classic) Edit form page
- Select an item and click on the title column value should open the lists customised (classic) Display form page
Environment details (development & target environment)
- Your Developer Environment: Windows 10 & MacOS
- Target Environment: SharePoint Online
- Browser(s): Chrome, IE 11, Edge, Chromium Edge, Safari
Additional context
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
That's by design... modern doesn't pay attention to the custom form pages.
But this used to be the behaviour, and has been for a long time
Maybe I misunderstood the question... can you clarify?
For as long as I can remember, the modern list experience has never respected the form properties on a list. Properties were only used in the classic experience. That was the workaround developers tried when creating custom forms with SPFx.
Sure yes, the list properties for New/Edit & Disp forms were left as is OOTB but the standard (classic) form pages were customised by navigating to the New/Edit & Disp form pages and modifying them by adding webparts...
e.g.
- In a modern experience list
- Navigate to https://tenant.sharepoint.com/sites/siteurl/Lists/MyList/EditForm.aspx?ID=X
- Edit the page add a CEWP webpart and Save
When this was done, then the New, Edit and Display list commands would navigate to the customised form pages instead of opening the details panel.
So Command-bar -> New, Command-bar -> Edit, right click -> Edit and Title column value click would all then navigate to the customised classic form page instead.
This was also true for the custom list view (JSON) actions defaultClick and editProps.
Until recently that is.
We have the same issue, not working on the prod tenant but on my dev tenant, everything is ok. We are using JSLinks attached to New/Edit/Display Form to redirect the user to the custom page where we have the SPFx web part. It suddenly stopped working 2 days ago.
Closing this issue as "answered". If you encounter a similar issue(s), please open up a new issue. See our wiki for more details: Issue-List: Our approach to closed issues
Thanks @andrewconnell
At this point I'm thinking that this scenario that's worked for quite some time, was by design and a breaking regression has been introduced, or that it worked by happy accident and this edge-case has been closed by recent changes?
A user just reported this on a classic site that was created a few years back, and I've confirmed. This happened once before a couple of months ago and resolved on its own, but the bug is back now. We would switch back to the classic experience, but unfortunately, the list has over 5,000 items so will no longer display in that mode. The custom form is used to hide/make fields read-only unless the person is in a particular SharePoint group (for reviewers/approvers) as the approvals are done on the form. Of course, we plan to modernize this at some point...after addressing 2010 workflows that will soon be disabled and completing new projects we have going with Power Apps and Power Automate.
Yeap, we are facing the same issue with jslinks again. We are using JSLinks attached to New/Edit/Display Form to redirect the user to the custom page where we have the SPFx web part. Microsoft does not provide any options to replace JSLinks in a modern approach. There is a suggestion with over 2k votes in UserVoice, but it stuck there forever. And Microsoft "Premium" Support suggest us to move our solutions to Power Apps. There is no way with that kind of complexity to get the forms done with PowerApps. So I guess here we go with another spfx extension as a hack to get around it.
As of today, the scenario for me is working as expected once again, but take note of MC222880
Changes in classic form customizations in modern lists and libraries
Published date: 25 Sep 2020
We are changing how customized forms work inside SharePoint lists and libraries that will affect tenants using the SharePoint classic experience.
Key points
Timing: late October to late November Roll-out: tenant level Control type: user control Action: review and assess by October 25, 2020 How this will affect your organization
Classic list and library forms support the following customizations:
- Set the ContentType.EditFormUrl or ContentType.NewFormUrl properties to point to a custom form URL
- Adding a Content editor web part or other web part to the form page
- By adding a JSLink to one or more fields that appear on the form Today, when one of these three customizations exists on a form inside a list or library that's configured to use the SharePoint modern experience, those forms will continue to render in classic to ensure customizations are visible to all users.
With this change
All customizations in the above list that were in place before October 25, 2020 will continue to render in the classic SharePoint experience. For customizations created after October 25, 2020:
- List item one customizations will continue to render in the classic experience
- List items two and three customizations will no longer render in the classic experience by default
What you need to do to prepare
This change affects only SharePoint list and form customizations after October 25, 2020. Therefore, your users need to take action only if they create new classic form customizations after October 25, 2020.
If your users have a list or library forms customized using methods two or three above, they can ensure it continues to fall back to classic by setting an EditFormUrl or NewFormUrl property to point to the existing form URL.
Users can also configure an entire list or library to use classic mode using Advanced settings
- Navigate to the list that you want to use classic mode.
- Select Settings Gear button and then select List Settings
- Select Advanced Settings
- Change the “List experience” setting to “Classic experience.”
It's working for us again, too. Wasn't working as of this morning. We were going to give it until Friday and then hide all the fields in the content type and create our own buttons using column formatting to take users to the custom new and edit forms.
This has now stopped working for us as well. We have lists using the modern experience that have stopped respecting the customized classic new/edit/display forms. The classic form pages were customised using "2. Adding a Content editor web part or other web part to the form page" years before October 25, 2020, so based on MC222880 we expected to be unaffected by the change.
Yes, this has re-occurred for us as well. We've used column formatting to add an edit link to the custom form on each item. We also have a custom new form, though. Rather than add a "new item" link on each item, we've added a link to create new items on the home page. Just a stopgap measure while we develop a modern solution with Power Apps.
This reoccured for me again today, even though my list changes occurred prior to Oct 25 2020 and wasn't expecting to have been caught.
I implemented the suggested fix by updating the List ContentType.EditForm property and that resolved the issue for me.
I only had to set the EditForm property, not all of the Edit/Display/New form properties (unless you need to of course)
note that now in this article- Differences between modern and classic experiences for lists and libraries
It states the following-
Notes:
Classic list forms support the following customizations:
- Set the ContentType.EditFormUrl or ContentType.NewFormUrl properties to point to a custom form URL
- Adding a Content Editor Web Part or other web part to the form page
- Adding a JSLink to one or more fields that appear on the form.
Only the first customization listed above will trigger a fallback to classic mode on the form.
This means that classic sites with classic forms on modern lists will only work when the content type has a edit or new form specified. Then you will see the classic form when you choose to edit or create a new item accordingly.
This is the expected/documented behavior now.
This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open or submit a new issue.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues