Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Wiki - nuBeforeDelete - little typo Topic is solved

Questions related to using nuBuilder Forte.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Wiki - nuBeforeDelete - little typo

Unread post by toms »

admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Wiki - nuBeforeDelete - little typo

Unread post by admin »

toms,

Done! Thanks.

Steven
selector
Posts: 41
Joined: Tue Feb 22, 2022 1:55 pm
Has thanked: 9 times

Re: Wiki - nuBeforeDelete - little typo

Unread post by selector »

Code: Select all

function nuBeforeDelete(){
   return false;
}
Form stay on screen, but after i close the form - its disappears from screen.
So this prevent only from deleting in frontend, while records still deleting from database.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Wiki - nuBeforeDelete - little typo

Unread post by kev1n »

You are missing function:

Code: Select all

function nuBeforeDelete(){
   return false;
}
selector
Posts: 41
Joined: Tue Feb 22, 2022 1:55 pm
Has thanked: 9 times

Re: Wiki - nuBeforeDelete - little typo

Unread post by selector »

kev1n wrote: Fri May 13, 2022 2:47 pm You are missing function:
Just in my forum message. Not in nubuilder.
short video

DB Version: V.4.5-2022.05.05.00
Files Version: V.4.5-2022.05.07.05
selector
Posts: 41
Joined: Tue Feb 22, 2022 1:55 pm
Has thanked: 9 times

Re: Wiki - nuBeforeDelete - little typo

Unread post by selector »

Ok. Little update. When i press back button after Delete - then the record remains. But if i click save btn - the record deleted.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Wiki - nuBeforeDelete - little typo

Unread post by kev1n »

Do you see any errors in the developer console?
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Wiki - nuBeforeDelete - little typo

Unread post by kev1n »

I tested it here and the record is not deleted:

https://test.nubuilder.cloud/index.php? ... t&p=nutest
selector
Posts: 41
Joined: Tue Feb 22, 2022 1:55 pm
Has thanked: 9 times

Re: Wiki - nuBeforeDelete - little typo

Unread post by selector »

kev1n wrote: Sat May 14, 2022 7:50 am I tested it here and the record is not deleted:

https://test.nubuilder.cloud/index.php? ... t&p=nutest
Try to press delete button, answer yes - to "Delete this record" and then save btn.
In my case, the record will simply be deleted. In your example, an error appears - "Not available in the Demo... ".
At the same time, there are no errors in the console.

I have not yet reached the deletion checks in my test project. But it looks like a serious problem. The behavior is similar to deleting rows in a subform. That is, somewhere there is a mark that the record should be deleted. And when you click Save, the deletion occurs.
Last edited by selector on Wed Jun 08, 2022 10:18 am, edited 2 times in total.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Wiki - nuBeforeDelete - little typo

Unread post by kev1n »

I can replicate. Try adding nuDieplayError('Deleting not allowed...'); in BD (Before Delete)
Post Reply