Sharepoint Form Save Button Code

Asher A 6 Reputation points
2022-03-16T23:41:09.327+00:00

Hi

I want to change the code behind the Save button on Sharepoint online. Can I only change it using sharepoint designer? The admin has not give rights to open the code in sharepoint designer.

If i try to edit the form online , the Save and Cancel buttons are always greyed out .

Thanks

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint Server | Development
{count} vote

3 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,486 Reputation points Microsoft External Staff
    2022-03-18T02:16:58.367+00:00

    Hi @Asher A ,
    SharePoint Online modern page doesn't support script editor. So we can return to classic experience or use spfx to add custom script.
    If you want to use classic experience. You can just follow the steps
    Click list setting >> advanced setting
    184238-image.png
    184279-image.png
    184351-image.png
    Then you can add a Script Editor by click Edit Page >> add a web part
    184298-image.png
    184300-image.png
    Finally post your code to the webpart
    184329-image.png

    If you are using modern page. The only way is to use spfx to insert js and css code. You can refer to following document.
    https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview
    https://www.sharepointdiary.com/2020/11/add-custom-css-to-sharepoint-online-modern-page.html
    And you can also deploy a Script Editor to sharepoint modern page by following example
    https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    1 person found this answer helpful.

  2. Asher A 6 Reputation points
    2022-03-28T14:52:23.897+00:00

    Hello

    I am sorry about the delay . I am trying to see the code behind the Save and Cancel buttons .

    Somehow the sharepoint designer rights have been blocked .

    I read the code behind those buttons could only be viewed through the designer.

    Thanks

    0 comments No comments

  3. Asher A 6 Reputation points
    2022-03-28T17:41:58.403+00:00

    I am trying to move list from one site to anothef subsite .

    Do these this come under configuration or Administration ?

    If i search for a book or a course what should I find it as ?

    Thanks


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.