Hello,
Is there a possibility to ask a user if she or he is sure to delete the current item?
I know the BD Before Delete PHP config but isn't it that I want to ask and stop the delete process on JavaScript level before it goes on on php level on the server?
Thanks.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Before Delete - Are you sure?
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Before Delete - Are you sure?
There's already a js popup "Delete This Record?" I don't really understand what you want.
-
- Posts: 38
- Joined: Wed May 29, 2019 2:50 pm
Re: Before Delete - Are you sure?
Sorry for being unclear. My mistake.kev1n wrote:There's already a js popup "Delete This Record?" I don't really understand what you want.
I want to add my own message with a specific text that clarifies what exactly is deleted by continuing.
Background infos:
I'm using iFrames with showing subelements in the edit view of a main element. That works very well but some users are confused that there are two Save Delete and Clone Buttons (one time for the main item itself in the upper left corner and one time in the iframe for the subelements). And now it happened that a user wanted to delete a subelement and accidentally removed the whole main element and we lost data due to this.
So I thought I add a more eyecatching text with "Are you really 100% totally sure to delete the MAIN element and not the tiny little sub element?". With many ??? and !!! and other eyecatching characters xD.
Hope this clarifies my intention.
thx
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Before Delete - Are you sure?
Maybe like this:
Code: Select all
function nuBeforeDelete(){
return confirm('Do you really want to delete?')
}
-
- Posts: 38
- Joined: Wed May 29, 2019 2:50 pm
Re: Before Delete - Are you sure?
Where do I have to enter this code?kev1n wrote:Maybe like this:
Code: Select all
function nuBeforeDelete(){ return confirm('Do you really want to delete?') }
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
-
- Posts: 38
- Joined: Wed May 29, 2019 2:50 pm
Re: Before Delete - Are you sure?
So you mean the "javascript" field and overload the function nuBeforeDelete()kev1n wrote:Options Menu -> Form Properties (Ctrl + Shift + F) -> Custom Code
That's not working for me.
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Before Delete - Are you sure?
Like this:fpdragon wrote:So you mean the "javascript" field and overload the function nuBeforeDelete()kev1n wrote:Options Menu -> Form Properties (Ctrl + Shift + F) -> Custom Code
That's not working for me.
https://streamable.com/rt1mk