Javascript to hide the CLOSE button and show the SAVE button

Hello,

When editing a record I want to hide the Close button and only show the Save button. (The Close button redirects to the List, which we don’t want in this instance)

Have tried this but it does not hide the Close button:

fd.spRendered(() => {
// remove the close button
fd.toolbar.buttons.splice(1, 1);
});

Can someone tell me what I’m doing wrong?
Thanks

Hello @Pandra ,

your code works for me :slight_smile:

SharePoint Online, Forms for SharePoint.

In Public Forms - try:

fd.rendered(() => {})

Documentation: https://plumsail.com/docs/forms-web/designer/javascript/form-manager.html#rendered