Page 1 of 2

Wiki - nuBeforeDelete - little typo

Posted: Wed Aug 08, 2018 5:49 pm
by toms

Re: Wiki - nuBeforeDelete - little typo

Posted: Fri Aug 10, 2018 11:37 pm
by admin
toms,

Done! Thanks.

Steven

Re: Wiki - nuBeforeDelete - little typo

Posted: Fri May 13, 2022 2:32 pm
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.

Re: Wiki - nuBeforeDelete - little typo

Posted: Fri May 13, 2022 2:47 pm
by kev1n
You are missing function:

Code: Select all

function nuBeforeDelete(){
   return false;
}

Re: Wiki - nuBeforeDelete - little typo

Posted: Fri May 13, 2022 6:52 pm
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

Re: Wiki - nuBeforeDelete - little typo

Posted: Sat May 14, 2022 7:08 am
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.

Re: Wiki - nuBeforeDelete - little typo

Posted: Sat May 14, 2022 7:37 am
by kev1n
Do you see any errors in the developer console?

Re: Wiki - nuBeforeDelete - little typo

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

https://test.nubuilder.cloud/index.php? ... t&p=nutest

Re: Wiki - nuBeforeDelete - little typo

Posted: Wed Jun 08, 2022 9:45 am
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.

Re: Wiki - nuBeforeDelete - little typo

Posted: Wed Jun 08, 2022 10:16 am
by kev1n
I can replicate. Try adding nuDieplayError('Deleting not allowed...'); in BD (Before Delete)