Submit rules after DELETE

This is a feature lacking that gives a weird and bad UX.

When it exists a delete link on table lines, deleting works very smoothly.

But most other cases, like having a Delete link at the bottom of an Edit Form, leaves the user in No man’s land. All the form fields disappear, and there are absolutely no way to inform the user on what to do or where to go. It’s like Hello?

So I propose that a similiar Submit Rules module for SUBMITING a Form should be available for DELETING.

Anyone having this No man’s land cases?

1 Like

TBH I never give users the ability to hard delete records. As there is no audit trail it’s a risk I prefer to avoid. I do understand the UX challenge though.

Archive, Restore and Soft Delete - Knack Database

5 Likes

Due to the inability to batch delete from the Live app I try and get users to “hard” delete whenever practicable which causes the problem outlined above by Michael, as Carl says in his very clear and concise video, keeping the record and marking it as deleted/archived keeps an audit trail and gives us much more control over the process, so yes some control over the delete option would be very welcome even if its just to place the confirmation box next to the record that is being deleted would be an improvement.

1 Like

After clicking Delete, there is always a pop-up message that ask for confirmation. Probably a security predefined by Knack.

Just seen again your video tutorial @CarlHolmes .
Soft Delete (trash) is a good way to delete it on the client side and have a backup if needed.

In my use-case I only gave access to hard delete to the Admin role.

1 Like

Hi @MichaelG , I was searching for the same thing… and I implement a workaround that worked for me using javascript, just change to the view where you have the action button.
( visitantes is my table name )
I hope it works for you :pray:

// After delete -visitante- at -visitante edit page- this redirects to parent page
$(document).on(‘knack-record-delete.view_80’, function(event, view, record) {
Knack.Navigation.redirectToParentPage();
});

1 Like

Wow, that’s interesting. I will try it. Thanks @Daniel2 !

1 Like

Hi @Daniel2 ,
In my case, I put the Delete buton under the Form view of the record details.
So the parent page would be the Details view of the record, which would have been deleted.

What would be the code to redirect to whatever page prefered?
tks

Hey Carl,

If you archive or soft-delete how do you handle filter menus in table-views where you are only allowed a single filter criteria?

I would normally use custom filter buttons to show “Active” or “Archived”. However, if you still want to allow the user to add filters, I’d set the table data source to not show archived records. I’d then add a new page linked from a menu button to a section that has all the archived items. This may be under admin control or available to everyone.

Thanks. That makes sense. I was too focused on the the filter menu to see the bigger picture.

1 Like

Hi guys,

Please, can we have a Submit Rules AFTER a click on Delete button.

Since ever, just to delete a child pop-up page, I always have to:

  • click the Delete button on a pop-up,
  • close the pop-up,
  • refresh the parent page.

3 times more clicks than the necessary.

I asked that on July 2022. please