How to link custom javascript in Modern UI List forms

Highlighted
Occasional Contributor

Hi ,

 

I am working on SharePoint online with Modern UI, i just want to add some javascript in one of my List forms to add some custom validation, as we earlier do in classic UI we can add the CEWP with custom JS link, but what we can do in modern UI ? If i return to classic view and add custom JS then again back to modern UI that javascript is not working

7 Replies
Highlighted
Have you looked at spfx extensions?
Highlighted

SPFX extension is not released yet also it would be common for all the pages not specifically for NewForm.aspx and EditForm.aspx, do i need to put URL specific condition ?

Highlighted
As far as I know there is no other option then waiting for the GA release. I guess you could start developing with the latest RC.
Highlighted
SPFx extensions are out of preview so they are in fact released, but not rolled out globally...Might I ask what kind of customization you need to do? Microsoft also disclosed at Ignite a new way to add custom formatting in list columns by using JSON
Highlighted

Thanks Juan, i have also checked that extensions are out of preview,

and i want to put some validation on multiple fields like i want to disable one textfield based on another dropdown similar javascript validation, i am curious to know how we can do that using JSON

Highlighted

Hi Awake!

It can be a little bit tricky even with an SPFx extension. I can recommend you to take a look at a 3-rd party solution - Plumsail Forms. This tool allows you to design responsive forms for Modern UI and provides a lot customization capabilities. Find some samples.

Highlighted

Hi Awake,

 

It is also possible to add a custom list form using Microsoft PowerApps. In this you could build pretty much what you describe.