can we write custom js in before_save logic, stop saving record?

Hi

I need to show js alert before record save and stop saving it? can we add js in logic hook?

thanks
Naren

Yes, it is possible.

Follow the instructions on how to create a logic hook. Put your javascript into a php variable and echo it with php.