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();
});