I want to replace the New
and Edit
forms for a specific list
. I have a SharePoint Add-in which has two forms (one for New and one for Edit) and now I want to make sure that when a user click New or Edit my custom forms are used.
This should cover both when users create items using the ribbon button New Item and when they click the +new item
link on the AllItems.aspx
page.
I don't want to do this using server-side features, I want to use CSOM to do this!
There is a good Dev PnP sample on how to add new Ribbon buttons using CSOM that I'm using to add buttons with custom commands in the Display form. My first thought was to do something similar to this but perhaps this is the wrong path.
Clarification
I have a SP Add-in and the web-project part of the add-in is an MVC application that has two forms, one for new and one for edit. Perhaps being an Add-in is not necessary and a normal ASP.NET project is just fine. But regardless of which type of project the form is located in I don't see how I can upload the forms to the Forms Library, as they are dependent on c# code in the DLL to execute.
UPDATE
We ended up skipping custom forms and instead used Site Columns to define which fields is shown in which form, less code and uses configuration instead. Thanks for the discussions!