…in order to prepare for Modern sites, pages, and the SharePoint mobile application.
Okay… here we are... Day 3. Let’s see who I can make angry today? Doing this post as a five-part series is an interesting experiment on human nature. Some people think it’s great, some people do NOT like the fact that to them this stuff is common sense. I’ve even tweaked the way I’m titling it based on feedback. All in all, good stuff. I appreciate everyone’s feedback. Keep it coming!
Back to the post. Day 3. Yesterday we talked about why you should stop adding script references to your Master Pages, today we are going to talk about why you should stop modifying SharePoint’s default forms if you want to prepare for the new modern sites, pages, and the SharePoint mobile application.
Modifying default SharePoint Forms
This one stings. A few of my most popular posts deal with modifying the default forms in SharePoint by injecting some script on the page:
- Easy Digital Signatures in SharePoint
- Tabify your SharePoint Forms
- Cascading Drop Down Lists in SharePoint / Office 365 using REST
- Easy Custom Layouts for Default SharePoint Forms
With just a little jQuery you can create cascading dropdown lists, show/hide fields, add complicated business logic or completely change the way the form looks. Great right??
Well, not so fast. There is currently no way to inject script on list/library forms for the new modern forms. What’s more, even if you COULD inject script on those pages, any previous scripts you may have written will not work because Microsoft has completely changed the way new forms look and work. The forms are now rendered using the React framework and in no way resembles what was there before.
If you have any hopes of using the new modern pages, you’ll need to look for a different approach to customizing your forms.
Instead you should…
Well, it has been stated that the future of forms in SharePoint is Power Apps. However, there’s a good chance you won’t be able to create the complex forms you need using Power Apps. The functionality is just not there yet. If you have simple form needs definitely take a look at Power Apps and see what it can do for you. Need something more complex? There are other forms tools out there, but many of them will not work on the new modern pages.
So there you have it... Short and sweet… if you are injecting scripts to customize your forms today in classic mode, it will not work on modern forms. You’ll need to prepare in order to succeed on the modern pages.
Tomorrow we’ll take this topic one step further and discuss why you should stop manipulating the DOM in your SharePoint pages altogether.