# Delete Message

**URL:** <https://forums.knack.com/t/delete-message/19250>\
**Category:** Get Answers\
**Created:** [April 25, 2025, 8:18pm UTC](https://forums.knack.com/t/delete-message/19250 "2025-04-25T20:18:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/jaini/32/4803_2.png) [@JAINI](https://forums.knack.com/u/JAINI)\
**Post date:** [April 25, 2025, 8:18pm UTC](https://forums.knack.com/t/delete-message/19250/1 "2025-04-25T20:18:10Z")

</div>

Hi,  
Does anyone know how to change the delete message window with your own message, using JS.?  
Thank you

---

<div class="post-metadata">

**Author:** ![LeighBerre96926](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/leighberre96926/32/4896_2.png) [@LeighBerre96926](https://forums.knack.com/u/LeighBerre96926)\
**Post date:** [April 26, 2025, 3:09am UTC](https://forums.knack.com/t/delete-message/19250/2 "2025-04-26T03:09:55Z")

</div>

As far as I know …

In Knack, the confirmation popup you’re seeing when clicking a **delete action** button is a **native browser alert** triggered by Knack’s internal JavaScript. Unfortunately, because it uses the `window.confirm()` method, **you cannot directly change the text or styling** of that popup — it’s controlled by the browser, not Knack or custom scripts.

---

<div class="post-metadata">

**Author:** ![LeighBerre96926](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/leighberre96926/32/4896_2.png) [@LeighBerre96926](https://forums.knack.com/u/LeighBerre96926)\
**Post date:** [April 26, 2025, 3:33am UTC](https://forums.knack.com/t/delete-message/19250/3 "2025-04-26T03:33:26Z")

</div>

This is one of the many reasons that a lot of Knack developers tend to use “soft deletes”. By this I mean to add a “Marked for Deletion” flag to records, and on user views filter out records that have been marked for deletion, so they are effectively “gone” from the user’s world.

Now a “delete” is a simply an action button to change the flag from its default NO to YES.

You can then manually delete these marked records on a regular basis from the Builder - and in the meantime if someone deleted something accidentally it is trivial to restore it.

---

<div class="post-metadata">

**Author:** ![JAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/jaini/32/4803_2.png) [@JAINI](https://forums.knack.com/u/JAINI)\
**Post date:** [April 26, 2025, 8:21pm UTC](https://forums.knack.com/t/delete-message/19250/4 "2025-04-26T20:21:41Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![CarlHolmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/carlholmes/32/2814_2.png) [@CarlHolmes](https://forums.knack.com/u/CarlHolmes)\
**Post date:** [April 26, 2025, 8:39pm UTC](https://forums.knack.com/t/delete-message/19250/5 "2025-04-26T20:39:53Z")

</div>

@JAINI - I recorded this three years ago - it may be of interest 😎

Archive, Restore and Soft Delete

[![](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/9/9c25c1cc95c107a39aa574559561836c8e1544f0.jpeg "Archive, Restore and Soft Delete - Knack Database") ](https://www.youtube.com/watch?v=FxcZj6OdMIs)

---

<div class="post-metadata">

**Author:** ![PhilWesley67576](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/philwesley67576/32/157_2.png) [@PhilWesley67576](https://forums.knack.com/u/PhilWesley67576)\
**Post date:** [May 1, 2025, 2:05am UTC](https://forums.knack.com/t/delete-message/19250/7 "2025-05-01T02:05:35Z")

</div>

Im not sure which dialogue you’re referring to, can you take a screenshot?

---

<div class="post-metadata">

**Author:** ![JAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/jaini/32/4803_2.png) [@JAINI](https://forums.knack.com/u/JAINI)\
**Post date:** [May 1, 2025, 4:55pm UTC](https://forums.knack.com/t/delete-message/19250/8 "2025-05-01T16:55:04Z")

</div>

![delete dialogue-2](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/e/ec4d0f985dc63b21b6b51a76eaf5fa1afe98812f.png)

---

<div class="post-metadata">

**Author:** ![RealEyesDisplays](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/realeyesdisplays/32/1444_2.png) [@RealEyesDisplays](https://forums.knack.com/u/RealEyesDisplays)\
**Post date:** [May 2, 2025, 3:40pm UTC](https://forums.knack.com/t/delete-message/19250/9 "2025-05-02T15:40:22Z")

</div>

One alternative is on your grid, instead of adding a Delete action, add a “Details Page” instead. Tell the field to show with the trash can icon, and you can style it exactly the same as the real one. Set the details page as a modal pop up, and you can type any warnings you want, and even show any connections that record has to remind the user. (in our case, we use Knack as a CMS for our touch screen displays, and in this pop up we remind the user that this record is connected to X displays at X locations)

Then, add your Delete action on the details pop up and call it “Confirm Delete” and I often restyle it so it’s larger. OR, instead of delete, you could also use this with the soft delete that Carl mention above, and use a “trigger an action” to update a soft delete field to YES so that the record is filtered out instead of deleted.

---

<div class="post-metadata">

**Author:** ![JAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/jaini/32/4803_2.png) [@JAINI](https://forums.knack.com/u/JAINI)\
**Post date:** [May 2, 2025, 4:00pm UTC](https://forums.knack.com/t/delete-message/19250/10 "2025-05-02T16:00:30Z")

</div>

Cool.Thank you.
