In newer tenants, Custom script ability is disabled by default in SharePoint Admin. It prevents adding custom JavaScript to web part pages, as well as disables multiple other features, for instance:
- Save Site as Template
- Save document library as template
- SharePoint Designer
To be able to use our form capabilities, you have to enable custom script. When disabled, it will enforce Deny permission on "Add and modify pages", making it impossible to customize forms.
Please read more on how you can enable this setting: https://docs.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script
NOTE: this setting takes up to 24 hours to come into effect.