Custom delete button in form

Hello,

i was wondering how i can create a custom delete button within a form? When the button is clicked, the user should redirected to a site.
I have a custom close and save button, so i also want a custom "delete" button.

I found something in the community https://community.plumsail.com/t/add-delete-item-and-workflows-button-to-forms/9322 but that is just for a child item within a parent item.

I also found no hints in the documentation.

Can you help? Thanks :wink:

Hello @DanielB,

You've found the correct topic. You can add custom button to the form and add the code that deletes the current item and closes to the button's Click property:

pnp.sp.web.lists.getByTitle('List Name').items.getById(fd.itemId).delete().then(function(){
  fd.close();
});

hi, i want to show delete buttom in relateditem in spform
delet buttom show in list but does not show in related item

Hello @shahla_Angha,

Welcome to pLumsail Community!

What version of SharePoint are you using? Online or On-premises?

What is the version of the desktop designer? Please share the screenshot.